Hi
I have an XForm where I am trying to use Javascript and xforms:dispatch to modify the instance. This is what I did as a solution: I give the instance an empty root element when it doesn't contain the @src (to avoid getting an xforms error (it is invalid XForms to have an empty instance element). Then I would try to set the @src on the instance when the xforms-model-construct is fired. The model won't kick of the loading of the instance document until the default handling of xforms-model-construct, so the handler should happen before that. I tested this out but it does not work. I have attached the code here (including an xml file resetInstance.xml). For me it throws an unknown error: -I view.xhtml resetInstance.xml |
Administrator
|
On Thu, Jul 10, 2008 at 6:58 AM, ilango_g <[hidden email]> wrote:
> I have an XForm where I am trying to use Javascript and xforms:dispatch to > modify the instance. This is what I did as a solution: > I give the instance an empty root element when it doesn't contain the @src > (to avoid getting an xforms error (it is invalid XForms to have an empty > instance element). Then I would try to set the @src on the instance when > the > xforms-model-construct is fired. The model won't kick of the loading of > the instance document until the default handling of > xforms-model-construct, so the handler should happen before that. I > tested this out but it does not work. run a submission that replaces the instance. If you need the URL to be dynamic, you can use an AVT in the action attribute of <xforms:submission>. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet -- 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 |
Hi Alex
How can I use an AVT in the action attribute of <xforms:submission>? Is it like an XPATH in curly braces{} ilango
|
Yes, you use {}
----------------------------------------------- Ryan Puddephatt FIX Developer Fidessa LatentZero 1 Alfred Place London WC1E 7EB Office: +44 (0) 20 7462 4200 Direct: +44 (0) 20 7323 6112 Blackberry: +44 (0) 79 8539 2458 Fax: +44 (0) 20 7462 4242 Email: [hidden email] Web: http://www.latentzero.com -----Original Message----- From: ilango_g [mailto:[hidden email]] Sent: 22 July 2008 15:40 To: [hidden email] Subject: [ops-users] Re: Uses javascript and xforms:dispatch to modify the instance Hi Alex How can I use an AVT in the action attribute of <xforms:submission>? Is it like an XPATH in curly braces{} ilango Alessandro Vernet wrote: > > On Thu, Jul 10, 2008 at 6:58 AM, ilango_g <[hidden email]> wrote: >> I have an XForm where I am trying to use Javascript and >> xforms:dispatch to modify the instance. This is what I did as a >> solution: >> I give the instance an empty root element when it doesn't contain the >> @src (to avoid getting an xforms error (it is invalid XForms to have >> an empty instance element). Then I would try to set the @src on the >> instance when the xforms-model-construct is fired. The model won't >> kick of the loading of the instance document until the default >> handling of xforms-model-construct, so the handler should happen >> before that. I tested this out but it does not work. > > You can't dynamically change the @src on an instance. Instead, you can > run a submission that replaces the instance. If you need the URL to be > dynamic, you can use an AVT in the action attribute of > <xforms:submission>. > > Alex > -- > Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's > Blog: http://www.orbeon.com/blog/ Personal Blog: > http://avernet.blogspot.com/ Twitter - http://twitter.com/avernet > > > -- > 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 2.0 Forms, open-source, for the Enterprise > http://www.orbeon.com/ > > View this message in context: http://www.nabble.com/Uses-javascript-and-xforms%3Adispatch-to-modify-the-instance-tp18383039p18589581.html Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _____________________________________________________________________ This e-mail has been scanned for viruses by Verizon Business Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.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 |
Free forum by Nabble | Edit this page |