I would like help please with understanding this xforms:repeat. I'm basing my form on the DMV example, but I would like to implement an edit for a simple two level sequence structure for entering one or more qualifications. This is the XML
<qualificationstest> <eachqualificationtest> enter qualification </eachqualificationtest> </qualificationstest> I have a form <xforms:group ref="fold:qualificationstest"> and below this code <table class="fold-gridtable"> <tr> <td> <xforms:input incremental="true" ref="fold:eachqualificationtest" class="fold- eachqualificationtest"> <xforms:label ref="instance('resources- instance')/labels/eachqualificationtest"/> <xforms:alert ref="instance('resources- instance')/alerts/eachqualificationtest"/> </xforms:input> </td> </tr> To try and add a quailification I have the code in <table class="fold-actions-table"> <xforms:action ev:event="DOMActivate"> <xforms:insert nodeset="instance('main- instance')//fold:qualificationstest" at="index ('qualificationstest-repeat')" position="after"/> <xforms:setvalue ref="instance('main- instance')//fold:qualificationstest[index('qualificationstest- repeat')]"/> </xforms:action> There is something wrong with this code but I can't figure out what, if the code is right then I must have an error elsewhere on the form. If Igot the hang of adding an item hopefully I could work out the code for editing and deleting. Thank You for your help. If you have documentation or an example such as this, please could you point me towards it. I think the todo list is a bit similar but I thhink that used attributes. Peter -- 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
|
Hi Peter,
For an example of two-level repeat, have a look at the to-do list example. And if you get something that doesn't quite work as it should, it is better to send us a subset of your code that shows the problem and that we can run in the XForms sandbox. Alex On 5/23/06, [hidden email] <[hidden email]> wrote: > I would like help please with understanding this xforms:repeat. I'm basing my form on the DMV example, but I would like to implement an edit for a simple two level sequence structure for entering one or more qualifications. This is the XML > > <qualificationstest> > <eachqualificationtest> > enter qualification > </eachqualificationtest> > </qualificationstest> > > I have a form <xforms:group ref="fold:qualificationstest"> and below this code > > <table class="fold-gridtable"> > <tr> > <td> > > <xforms:input incremental="true" > ref="fold:eachqualificationtest" class="fold- > eachqualificationtest"> > <xforms:label ref="instance('resources- > instance')/labels/eachqualificationtest"/> > <xforms:alert ref="instance('resources- > instance')/alerts/eachqualificationtest"/> > > </xforms:input> > </td> > > > > </tr> > > To try and add a quailification I have the code in <table class="fold-actions-table"> > > <xforms:action ev:event="DOMActivate"> > > <xforms:insert nodeset="instance('main- > instance')//fold:qualificationstest" at="index > ('qualificationstest-repeat')" position="after"/> > > > <xforms:setvalue ref="instance('main- > instance')//fold:qualificationstest[index('qualificationstest- > repeat')]"/> > </xforms:action> > > There is something wrong with this code but I can't figure out what, if the code is right then I must have an error elsewhere on the form. If Igot the hang of adding an item hopefully I could work out the code for editing and deleting. > > Thank You for your help. If you have documentation or an example such as this, please could you point me towards it. I think the todo list is a bit similar but I thhink that used attributes. > > Peter > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |