Hi,
I have the following working situation: <xforms:instance id="detail-instance"> <item> <id/> <read-only/> </item> </xforms:instance> <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> <xforms:send submission="detail-submission"/> </xforms:action> However when I change the action by adding a second setvalue <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> <!-- added --> <xforms:setvalue ref="instance('detail-instance')/read-only" value="instance('flowcontrol-instance')/read-only" /> <!-- added --> <xforms:send submission="detail-submission"/> </xforms:action> I do get the error: "xforms:instance element must contain exactly one child element" which puzzles me. Paul -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Paul,
Funny indeed. This message is displayed when the model initializes (upon receiving xforms-model-construct) and looks for the content of <xforms:instance>. So I can't see how this can occur as a consequence of setvalue. On the other hand I can't doubt that you are seeing this message. Can you send a reproducible case that runs in the sandbox? -Erik [hidden email] wrote: > Hi, > > I have the following working situation: > > <xforms:instance id="detail-instance"> > <item> > <id/> > <read-only/> > </item> > </xforms:instance> > > <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/> > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > <xforms:send submission="detail-submission"/> > </xforms:action> > > However when I change the action by adding a second setvalue > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > > <!-- added --> > > <xforms:setvalue ref="instance('detail-instance')/read-only" > value="instance('flowcontrol-instance')/read-only" /> > > <!-- added --> > > <xforms:send submission="detail-submission"/> > </xforms:action> > > I do get the error: > "xforms:instance element must contain exactly one child element" > which puzzles me. Orbeon Forms - XForms Everywhere http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I found the problem.
The additional set did put an additional parameter on the GET http address, seperated by ';'. When replacing ';' by "&", the parameters were separated as expected in the Request generator. With ';' the id used for querying the database was modified and hence resulted in an empty result. Paul -----Original Message----- From: Erik Bruchez on behalf of Erik Bruchez Sent: Thu 9-11-2006 16:49 To: [hidden email] Subject: Re: [ops-users] xforms:instance element must contain exactly one child element Paul, Funny indeed. This message is displayed when the model initializes (upon receiving xforms-model-construct) and looks for the content of <xforms:instance>. So I can't see how this can occur as a consequence of setvalue. On the other hand I can't doubt that you are seeing this message. Can you send a reproducible case that runs in the sandbox? -Erik [hidden email] wrote: > Hi, > > I have the following working situation: > > <xforms:instance id="detail-instance"> > <item> > <id/> > <read-only/> > </item> > </xforms:instance> > > <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/> > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > <xforms:send submission="detail-submission"/> > </xforms:action> > > However when I change the action by adding a second setvalue > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > > <!-- added --> > > <xforms:setvalue ref="instance('detail-instance')/read-only" > value="instance('flowcontrol-instance')/read-only" /> > > <!-- added --> > > <xforms:send submission="detail-submission"/> > </xforms:action> > > I do get the error: > "xforms:instance element must contain exactly one child element" > which puzzles me. Orbeon Forms - XForms Everywhere http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws winmail.dat (5K) Download Attachment |
I found the problem.
The additional set did put an additional parameter on the GET http address, seperated by ';'. When replacing ';' by "&", the parameters were separated as expected in the Request generator. With ';' the id used for querying the database was modified and hence resulted in an empty result. Paul -----Original Message----- From: Erik Bruchez on behalf of Erik Bruchez Sent: Thu 9-11-2006 16:49 To: [hidden email] Subject: Re: [ops-users] xforms:instance element must contain exactly one child element Paul, Funny indeed. This message is displayed when the model initializes (upon receiving xforms-model-construct) and looks for the content of <xforms:instance>. So I can't see how this can occur as a consequence of setvalue. On the other hand I can't doubt that you are seeing this message. Can you send a reproducible case that runs in the sandbox? -Erik [hidden email] wrote: > Hi, > > I have the following working situation: > > <xforms:instance id="detail-instance"> > <item> > <id/> > <read-only/> > </item> > </xforms:instance> > > <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/> > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > <xforms:send submission="detail-submission"/> > </xforms:action> > > However when I change the action by adding a second setvalue > > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="instance('detail-instance')/id" value="instance('result-instance')/*[index('result-items')]/id"/> > > <!-- added --> > > <xforms:setvalue ref="instance('detail-instance')/read-only" > value="instance('flowcontrol-instance')/read-only" /> > > <!-- added --> > > <xforms:send submission="detail-submission"/> > </xforms:action> > > I do get the error: > "xforms:instance element must contain exactly one child element" > which puzzles me. Orbeon Forms - XForms Everywhere http://www.orbeon.com/blog/ -- 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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |