I am trying to use xform:repeat
I am using the model from the example book, I changed note to notes which ontains multiple note here is the model <xforms:instance id="books-instance"> <books xmlns=""> <book> <title/> <author/> <language/> <link/> <rating/> <notes> <note/> </notes> </book> </books> </xforms:instance>I want the form control for note to apprear multiple times . I tried using xforms:repeat but the form-control does not repeat. Please help me add multiple note form-control . here is my complete jsp <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <xforms:model> <xforms:instance id="books-instance"> <books xmlns=""> <book> <title/> <author/> <language/> <link/> <rating/> <notes> <note/> </notes> </book> </books> </xforms:instance> <xforms:bind nodeset="instance('books-instance')/book"> <xforms:bind nodeset="title" required="true()"/> <xforms:bind nodeset="author" required="true()"/> </xforms:bind> </xforms:model> </head> <body> <xforms:group ref="book"> <p> <xforms:input ref="title"> <xforms:label>Title</xforms:label> </xforms:input> </p> <p> <xforms:input ref="author"> <xforms:label>Author</xforms:label> </xforms:input> </p> <p> <xforms:repeat nodeset="notes" maxOccurs="30"> <xforms:textarea ref="note"> <xforms:label>Notes</xforms:label> </xforms:textarea> </xforms:repeat> </p> </xforms:group> </body> </html> |
Administrator
|
This uses relative paths, so you should write:
<xforms:repeat nodeset="notes/note" maxOccurs="30"> (BTW maxOccurs won't do anything on a plain xforms:repeat.) -Erik On Wed, Mar 21, 2012 at 8:33 AM, fachhoch <[hidden email]> wrote: > I am trying to use xform:repeat > > I am using the model from the example book, I changed note to notes which > ontains multiple note > > here is the model > > I want the form control for note to apprear multiple times . > I tried using xforms:repeat but the form-control does not repeat. > Please help me add multiple note form-control . > here is my complete jsp > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/using-xform-repeat-tp4492675p4492675.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > -- 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 |