I built a form using form builder and I am now trying to make one of the rows repeatable by adding xforms:repeat tags. The problem I'm running into is that whenever I put the <xforms:repeat> tag around the row I want to repeat, the row disappears. Here's the relevant code.
<xforms:instance id="account-template"> <form1> <section-3> <control-40/> <control-41/> <control-42/> <control-43/> </section-3> </form1> </xforms:instance> <xforms:repeat nodeset="instance('account-template')/section-3" id="account-repeat"> <xhtml:tr> <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xbl="http://www.w3.org/ns/xbl"> <xforms:select1 appearance="minimal" id="control-40-control" ref="control-40"> <xforms:label ref="$form-resources/control-40/label"/> <xforms:hint ref="$form-resources/control-40/hint"/> <xforms:help ref="$form-resources/control-40/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> <xforms:item> <xforms:label>[Select...]</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="$form-resources/control-40/item"> <xforms:label ref="label"/> <xforms:value ref="value"/> </xforms:itemset> </xforms:select1> </xhtml:td> <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xbl="http://www.w3.org/ns/xbl"> <xforms:output id="control-41-control" ref="control-41"> <xforms:label ref="$form-resources/control-41/label"/> <xforms:help ref="$form-resources/control-41/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:output> </xhtml:td> <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xbl="http://www.w3.org/ns/xbl"> <xforms:input id="control-42-control" ref="control-42"> <xforms:label ref="$form-resources/control-42/label"/> <xforms:hint ref="$form-resources/control-42/hint"/> <xforms:help ref="$form-resources/control-42/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:input> </xhtml:td> <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns="http://orbeon.org/oxf/xml/form-builder" xmlns:xbl="http://www.w3.org/ns/xbl"> <xforms:input id="control-43-control" ref="control-43"> <xforms:label ref="$form-resources/control-43/label"/> <xforms:hint ref="$form-resources/control-43/hint"/> <xforms:help ref="$form-resources/control-43/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:input> </xhtml:td> </xhtml:tr> </xforms:repeat> |
Administrator
|
Paul,
Just looking at the repeat/@nodeset and @ref attributes on the controls, this should work. Can you send a minimal form that reproduces this? -Erik On Tue, Mar 9, 2010 at 10:37 AM, paul8226 <[hidden email]> wrote: > > I built a form using form builder and I am now trying to make one of the rows > repeatable by adding xforms:repeat tags. The problem I'm running into is > that whenever I put the <xforms:repeat> tag around the row I want to repeat, > the row disappears. Here's the relevant code. > > <xforms:instance id="account-template"> > <form1> > <section-3> > <control-40/> > <control-41/> > <control-42/> > <control-43/> > </section-3> > </form1> > </xforms:instance> > > <xforms:repeat nodeset="instance('account-template')/section-3" > id="account-repeat"> > <xhtml:tr> > <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" > xmlns="http://orbeon.org/oxf/xml/form-builder" > xmlns:xbl="http://www.w3.org/ns/xbl"> > <xforms:select1 appearance="minimal" id="control-40-control" > ref="control-40"> > <xforms:label ref="$form-resources/control-40/label"/> > <xforms:hint ref="$form-resources/control-40/hint"/> > <xforms:help ref="$form-resources/control-40/help"/> > <xforms:alert ref="$fr-resources/detail/labels/alert"/> > <xforms:item> > <xforms:label>[Select...]</xforms:label> > <xforms:value/> > </xforms:item> > <xforms:itemset nodeset="$form-resources/control-40/item"> > <xforms:label ref="label"/> > <xforms:value ref="value"/> > </xforms:itemset> > </xforms:select1> > </xhtml:td> > <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" > xmlns="http://orbeon.org/oxf/xml/form-builder" > xmlns:xbl="http://www.w3.org/ns/xbl"> > <xforms:output id="control-41-control" ref="control-41"> > <xforms:label ref="$form-resources/control-41/label"/> > <xforms:help ref="$form-resources/control-41/help"/> > > <xforms:alert ref="$fr-resources/detail/labels/alert"/> > </xforms:output> > </xhtml:td> > <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" > xmlns="http://orbeon.org/oxf/xml/form-builder" > xmlns:xbl="http://www.w3.org/ns/xbl"> > <xforms:input id="control-42-control" ref="control-42"> > <xforms:label ref="$form-resources/control-42/label"/> > <xforms:hint ref="$form-resources/control-42/hint"/> > <xforms:help ref="$form-resources/control-42/help"/> > <xforms:alert ref="$fr-resources/detail/labels/alert"/> > </xforms:input> > </xhtml:td> > <xhtml:td xmlns:fb="http://orbeon.org/oxf/xml/form-builder" > xmlns="http://orbeon.org/oxf/xml/form-builder" > xmlns:xbl="http://www.w3.org/ns/xbl"> > <xforms:input id="control-43-control" ref="control-43"> > <xforms:label ref="$form-resources/control-43/label"/> > <xforms:hint ref="$form-resources/control-43/hint"/> > <xforms:help ref="$form-resources/control-43/help"/> > <xforms:alert ref="$fr-resources/detail/labels/alert"/> > </xforms:input> > </xhtml:td> > </xhtml:tr> > </xforms:repeat> > -- > View this message in context: http://n4.nabble.com/Form-Runner-and-XForms-Repeat-tp1586343p1586343.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 |
Here's one, thanks for looking into this.
<xhtml:html xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:saxon="http://saxon.sf.net/" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:exforms="http://www.exforms.org/exf/1-0" xmlns:fr="http://orbeon.org/oxf/xml/form-runner"> <xhtml:head> <xhtml:title>Repeat Test</xhtml:title> <xforms:model id="fr-form-model"> <xforms:instance id="fr-form-instance"> <form> <section-1> <control-1> <name>hello</name> </control-1> </section-1> </form> </xforms:instance> <xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')"> <xforms:bind id="section-1-bind" nodeset="section-1"> <xforms:bind id="control-1-bind" name="control-1" nodeset="control-1"/> </xforms:bind> </xforms:bind> <xforms:instance id="fr-form-metadata" xxforms:readonly="true"> <metadata> <application-name>Sample</application-name> <form-name>TestRepeat</form-name> <title xml:lang="en">Repeat Test</title> <description xml:lang="en"/> <author/> <logo mediatype="" filename="" size=""/> </metadata> </xforms:instance> <xforms:instance id="fr-form-attachments"> <attachments> <css mediatype="text/css" filename="" size=""/> <pdf mediatype="application/pdf" filename="" size=""/> </attachments> </xforms:instance> <xforms:instance id="fr-form-resources" xxforms:readonly="true"> <resources> <resource xml:lang="en"> <section-1> <label>Section 1</label> <help/> </section-1> <control-1> <label>Repeat this please.</label> <hint/> <help/> <alert/> </control-1> </resource> </resources> </xforms:instance> <xforms:instance id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all"> <request/> </xforms:instance> <xforms:instance id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all"> <response/> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <fr:view> <xforms:label ref="instance('fr-form-metadata')/title"/> <fr:body> <fr:section id="section-1-section" bind="section-1-bind"> <xforms:label ref="$form-resources/section-1/label"/> <xforms:help ref="$form-resources/section-1/help"/> <fr:grid columns="2"> <xforms:repeat nodeset="instance('fr-form-instance')/section-1/control-1" id="account-repeat"> <xhtml:tr> <xhtml:td> <xforms:input id="control-1-control" ref="name"> <xforms:label ref="$form-resources/control-1/label"/> <xforms:hint ref="$form-resources/control-1/hint"/> <xforms:help ref="$form-resources/control-1/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> </xforms:input> </xhtml:td> <xhtml:td/> </xhtml:tr> </xforms:repeat> </fr:grid> </fr:section> </fr:body> </fr:view> </xhtml:body> </xhtml:html> |
I'm using build dev-3.7.1.200905272119 if that makes a difference.
|
Paul,
I am not sure if this is still relevant, but right now Form Builder supports a very limited format for repeats. Things work better if you replace <xforms:repeat> with something like the following: <fr:repeat nodeset="instance('fr-form-instance')/section-1/control-1" origin="/point/to/template/for/repeated/content" id="account-repeat" columns="2" appearance="xxforms:table"> <fr:body> <xhtml:tr> ... -Erik On Tue, Mar 16, 2010 at 12:40 PM, paul8226 <[hidden email]> wrote: > > I'm using build dev-3.7.1.200905272119 if that makes a difference. > -- > View this message in context: http://n4.nabble.com/Form-Runner-and-XForms-Repeat-tp1586343p1595441.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 |