On Sat, 2003-08-16 at 14:31, maisonneuve nico wrote:
> hi everybody,
> 
> i would like a example on a woody multiple repeater inclusion form..
> For example , i have to make a form to edit this xml :
> 
> 
> <documents>
> 
>   <document>
>    <title>Title1</title>
>    <authors>
>      <author name="coco"/>
>      <author name="coco2"/>
>      ...
>    </authors>
>   </document>
> 
>   <document>
>      <title>Title2</title>
>      <authors>
>        <author name="coco3"/>
>        <author name="coco4"/>
>        ...
>    </authors
>   </document>
> ...
> </documemnts>
> 
> thank in advance

Hi,

basically you simply need to nest the repeaters, thus in the form
definition you will have nested repeater elements, e.g.:

  <wd:repeater id="documents">
    <wd:field id="title">
      ...
    </wd:field>
    <wd:repeater id="authors">
      <wd:field id="name">
         ...
      </wd:field>
    </wd:repeater>
  </wd:repeater>

And similary, in the form template you will also have to nest the
repeater-related elements:

<wt:repeater-size id="documents"/>
<table>
  <wt:repeater-widget id="documents">
    <tr>
      <td><wt:widget id="title"/></td>
      <td>
        <wt:repeater-size id="authors"/>
        <table>
          <wt:repeater-widget id="authors">
            <tr>
               <td><wt:widget id="name"/></td>
            </tr>
          </wt:repeater-widget>
        </table>
      </td>
    </tr>
</table>

I haven't ever tried anything of the above, but I'd be interested to
know if you succeed in this or not. If you have more questions, simply
ask.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to