Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Hi,

I have a strange behavior when I try to save my instance via REST.

In my form I have multiple instances

<instance-data></instance-data>
<instance-label></instance-label>
<instance-help></instance-help>
.......
..........

Here is my xforms:submission

 <xforms:submission
                                id="submit"
                                ref="instance('instance-data')"
                                action="http://localhost:7001/epss/epss-forms/rs/12/1/A1/2" 
                                method="put"
                                replace="none" > 
    <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while saving! </xforms:message> 
                        </xforms:submission>       

That submission will display the alert message

I thought I had done something wrong, then I changed my ref attribute value by instance('instance-help'), and my instance has been saved in my database.

Is that normal that we cannot reference the first instance via the "instance('???')"

Now sorry for that noob question, but how can you simply save the first instance ??

I tried lots of things [/instance-data, /instance-data/*, *, instance('instance-data'), ....] without success.

Am I missing something ??

Thanks a lot for your help.

Regards,
Stessy
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Hello,

I investigated a bit. :-)

First of all, attached is my form. A2.xhtml

I think the problem comes from my xforms:bind

I really don't know why, If I disable my bindings, I can submit my instance. On the other hand, if my bindings are enabled I cannot submit my instance.

Do you have any idea why such problem occurs??

Regards,
Stessy
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Investigating, investigating, investigating. :-)

Really strange.

All the following bindings enabled doesn't permit to submit the form

<xforms:bind nodeset="/FORM.FP7CP.1.A2/part_leg_nam" id="part_leg_nam_required" readonly="false()" required="true()"/>

All the ones having the following structure :

id + readonly="false()" +  required="true()" block the submission.

If I remove the required="true()" in every binding, the submission works.

If someone have an advice, it's welcome, because I become crazy :-)

Regards,
Stessy

Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Finally found what was the problem.

If the required field is empty, it does not let me submit the form.

Is there a possibility to let the system submit the form even if it is invalid ????

Regards,
Stessy
Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Hi,

is there someone who can tell me if it's possible to save instance data into Oracle database (via REST) even if the form is invalid ??

<xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while saving! </xforms:message>

This error is catched if some mandatory fields are not filled in.

Is there a param to modify in the config files, to have this working??

Thanks a lot for your help
Regards,
Stessy
Reply | Threaded
Open this post in threaded view
|

Re: Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

Benjamin
Hi Stessy,

i dont know if this works for Oracle, but you can use in the submission the @validate like this:

<xforms:submission id="my_submission" ..more attributes ..  validate="false"/>                       

If you do, no validation from orbeon takes place.

All the best Benjamin

stessy schrieb:
Hi,

is there someone who can tell me if it's possible to save instance data into
Oracle database (via REST) even if the form is invalid ?? 

<xforms:message ev:event="xforms-submit-error" level="modal">An error
occurred while saving! </xforms:message>

This error is catched if some mandatory fields are not filled in. 

Is there a param to modify in the config files, to have this working??

Thanks a lot for your help
Regards,
Stessy
  


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Strange behavior: first instance (I.E: myFirstInstance) cannot be referenced by instance('myFirstInstance')

stessy
Hi Benjamin,

That works if I add the validate attribute.

Thanks a lot for your help.

Regards,
Stessy