How it can support repeat for element with nested structure.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How it can support repeat for element with nested structure.

akmishra
I have content with structure as given below.

<section>
    <section>
      <section>
        ...
      </section>
   </section>
</section>

Where I want to repeat section control as many times as it appear with in
section.
Please refer the attached xform file. issue-with-circuler-reference.xhtml
<http://discuss.orbeon.com/file/t375711/issue-with-circuler-reference.xhtml>  

Any help would be appreciated.

Thanks,
AK

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: How it can support repeat for element with nested structure.

Alessandro  Vernet
Administrator
Hi AK,

You can simply do:

<xf:repeat ref="//section">
    <xf:input ref="."/>
</xf:repeat>

This will show 2 input fields, since you have 2 `<section>` elements, and
this irrelevant of their "depth" in your instance. Full source:  view.xhtml
<http://discuss.orbeon.com/file/t119778/view.xhtml>  . You'll note I remove
all the `<fr:*>`, which are not supported outside of Form Runner (i.e. forms
created with Form Builder). Does this do what you were looking for?

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet