You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bhaskar Rathod <bh...@cs.unm.edu> on 2004/08/13 00:10:28 UTC
CForms: Nested Repeaters
Hi there,
I am trying to create a form that needs nesting of repeater widgets. But
the nested repeater is not shown. I can not see any errors on screen or
in the handled-errors.log file. I tried looking in generated HTML's
source (hoping that this may be a formatting problem), but the code for
nested repeater is not generated. I tried googling up the cocoon users
list, but I could only find a few random posts, which didn't seem to
lead anywhere.
Also, the code works perfectly for non-nested repeaters So I think the
problem may be restricted in my form def/template only. Following are
the relevant snippets from my form def and template files.
I am running cocoon 2.1.5.1 as a servlet on a SuSE Linux 9.1 machine.
Our production machine is a SuSE Linux 9.0 with cocoon 2.1.5.1 I have
already used cocoon forms in one of my projects recently and it works on
both these machines without any trouble.
I appreciate any help.
Thank you!
Bhaskar
<!--FORM DEFINITION-->
<fd:repeater id="repeat_main" initial-size="1">
<fd:label>Repeat All</fd:label>
<fd:widgets>
<fd:field id="repeater_child" required="true">
<fd:label>Repeater Child:</fd:label>
<fd:datatype base="string"/>
</fd:field>
<fd:booleanfield id="interested">
<fd:label>Are you interested in out spam?</fd:label>
<fd:help>Our spam contains precious worms and virii. You will
enjoy the countless opportunities of cleaning ur
system!
</fd:help>
<fd:hint>shhhh!!!click here!</fd:hint>
</fd:booleanfield>
<fd:repeater id="son_of_a_repeater">
<fd:widgets>
<fd:field id="a_text_input">
<fd:datatype base="string"/>
</fd:field>
<fd:row-action id="addchildchild" action-command="add-after">
<fd:label>Add</fd:label>
</fd:row-action>
<fd:row-action id="removechildchild" action-command="delete">
<fd:label>Remove</fd:label>
</fd:row-action>
</fd:widgets>
</fd:repeater> <!--End of child repeater-->
<fd:row-action id="addchild" action-command="add-after">
<fd:label>Add</fd:label>
</fd:row-action>
<fd:row-action id="removechild" action-command="delete">
<fd:label>Remove</fd:label>
</fd:row-action>
</fd:widgets>
</fd:repeater> <!--end of parent repeater-->
<!--FORM TEMPLATE -->
<tr>
<!-- Prepare header for display -->
<td colspan="2">
<ft:repeater-size id="repeat_main"/>
<table>
<tr>
<td>
<ft:repeater-widget-label id="repeat_main"
widget-id="repeater_child"/>
</td>
<td>
<ft:repeater-widget-label id="repeat_main"
widget-id="interested"/>
</td>
<td/>
</tr>
<ft:repeater-widget id="repeat_main">
<tr>
<td><ft:widget id="repeater_child"/></td>
<td><ft:widget id="interested"/></td>
</tr>
<tr>
<td>
<table>
<ft:repeater-widget id="son_of_a_struct">
<tr>
<td><ft:field id="rrr"/></td>
<td><ft:field id="grr"/></td>
<td><ft:widget id="addchildchild"/><ft:widget
id="removechildchild"/></td>
</tr>
</ft:repeater-widget>
</table>
</td>
</tr>
<tr>
<td><ft:widget id="addchild"/><ft:widget id="removechild"/></td>
</tr>
</ft:repeater-widget>
</table>
</td>
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org