I must be missing something... but
can't we save an instance that has been imported with xi:include ???
I have a form, and the instance is loaded with the xi:include. I modify then a few things in my form. With the widget inspector, I see that everyting is modified correctly, i.e. the instance is updated. I then want to store my instance <xforms:instance id="profile-instance"> <xi:include href="input:data"/> </xforms:instance> [...] <xforms:submission id="save-submission" ref="instance('profile-instance')" method="post" action="/update" /> [...] <xforms:trigger appearance="minimal"> <xforms:label> <img src="/design/images/save.gif" alt="Save" />Save </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="save-submission" /> </xforms:action> </xforms:trigger> My trigger will not work. If I replace the instance (another instance but this time not imported, just hard written) that is specified in my submission, then the trigger will work. So my question again is : do I have to put an empty instance that is exactly the same as the one i'm imported, then in the trigger I set the values of the empty instance to the corresponding values in the imported instance, and then I can fire the trigger? Isn't there a better way ? -- 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 |
Stephane Ruchet a écrit : I must be missing something... but can't we save an instance that has been imported with xi:include ??? -- 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 |
Administrator
|
Good :-)
BTW, especially now that we fixed a related bug, we recommend using: <xforms:instance src="input:instance"/> instead of using XInclude. The reason is that better caching can take place this way. -Erik On Nov 30, 2007, at 2:05 AM, Stephane Ruchet wrote: > Sorry for the spam... after a little night of sleep I found out the > problem. The trigger was not launched because an input that was > required was empty. ;) > > > Stephane Ruchet a écrit : >> >> I must be missing something... but can't we save an instance that >> has been imported with xi:include ??? >> >> I have a form, and the instance is loaded with the xi:include. I >> modify then a few things in my form. With the widget inspector, I >> see that everyting is modified correctly, i.e. the instance is >> updated. >> >> I then want to store my instance >> >> <xforms:instance id="profile-instance"> >> <xi:include href="input:data"/> >> </xforms:instance> >> >> [...] >> >> <xforms:submission id="save-submission" ref="instance('profile- >> instance')" method="post" action="/update" /> >> >> [...] >> >> <xforms:trigger appearance="minimal"> >> <xforms:label> >> <img src="/design/images/save.gif" alt="Save" />Save >> </xforms:label> >> <xforms:action ev:event="DOMActivate"> >> <xforms:send submission="save-submission" /> >> </xforms:action> >> </xforms:trigger> >> >> My trigger will not work. If I replace the instance (another >> instance but this time not imported, just hard written) that is >> specified in my submission, then the trigger will work. So my >> question again is : do I have to put an empty instance that is >> exactly the same as the one i'm imported, then in the trigger I set >> the values of the empty instance to the corresponding values in the >> imported instance, and then I can fire the trigger? Isn't there a >> better way ? >> >> > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Thanks for the info... but that line will not work. Any reason why? Erik Bruchez a écrit : Good :-) -- 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 |
Administrator
|
Of course there is a reason, I just don't know which one ;-)
We use this daily so it does usually work. Do you get an error? -Erik On Dec 4, 2007, at 12:35 AM, Stephane Ruchet wrote: > Hi Erik, > > Thanks for the info... but that line will not work. Any reason why? > > Erik Bruchez a écrit : >> >> Good :-) >> >> BTW, especially now that we fixed a related bug, we recommend using: >> >> <xforms:instance src="input:instance"/> >> >> instead of using XInclude. >> >> The reason is that better caching can take place this way. >> >> -Erik >> >> On Nov 30, 2007, at 2:05 AM, Stephane Ruchet wrote: >> >>> Sorry for the spam... after a little night of sleep I found out >>> the problem. The trigger was not launched because an input that >>> was required was empty. ;) >>> >>> >>> Stephane Ruchet a écrit : >>>> >>>> I must be missing something... but can't we save an instance that >>>> has been imported with xi:include ??? >>>> >>>> I have a form, and the instance is loaded with the xi:include. I >>>> modify then a few things in my form. With the widget inspector, I >>>> see that everyting is modified correctly, i.e. the instance is >>>> updated. >>>> >>>> I then want to store my instance >>>> >>>> <xforms:instance id="profile-instance"> >>>> <xi:include href="input:data"/> >>>> </xforms:instance> >>>> >>>> [...] >>>> >>>> <xforms:submission id="save-submission" ref="instance('profile- >>>> instance')" method="post" action="/update" /> >>>> >>>> [...] >>>> >>>> <xforms:trigger appearance="minimal"> >>>> <xforms:label> >>>> <img src="/design/images/save.gif" alt="Save" />Save >>>> </xforms:label> >>>> <xforms:action ev:event="DOMActivate"> >>>> <xforms:send submission="save-submission" /> >>>> </xforms:action> >>>> </xforms:trigger> >>>> >>>> My trigger will not work. If I replace the instance (another >>>> instance but this time not imported, just hard written) that is >>>> specified in my submission, then the trigger will work. So my >>>> question again is : do I have to put an empty instance that is >>>> exactly the same as the one i'm imported, then in the trigger I >>>> set the values of the empty instance to the corresponding values >>>> in the imported instance, and then I can fire the trigger? Isn't >>>> there a better way ? >>>> >>>> >>> >>> -- >>> 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 >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Duh ... ;)
No error, just the instance that is empty :( Erik Bruchez a écrit : Of course there is a reason, I just don't know which one ;-) -- 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 |
Free forum by Nabble | Edit this page |