You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jörn Nettingsmeier <ne...@apache.org> on 2006/10/13 15:33:45 UTC
cforms: conditional row-actions?
hi cocoon folks!
is there a way to add row-actions to repeater rows only if certain
conditions are met?
specifically, i want to do this:
* display a delete button only on the second and following rows, because
i need at least one value.
* display a move-up button only if the current row is not at the top.
* display a move-down button only if the current row is not at the bottom.
i'd appreciate pointers to examples. the cocoon-examples seem to
concentrate on repeater-actions mostly...
thanks in advance,
jörn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: cforms: conditional row-actions?
Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
Jörn Nettingsmeier wrote:
> hi cocoon folks!
>
>
> is there a way to add row-actions to repeater rows only if certain
> conditions are met?
>
> specifically, i want to do this:
>
> * display a delete button only on the second and following rows, because
> i need at least one value.
> * display a move-up button only if the current row is not at the top.
> * display a move-down button only if the current row is not at the bottom.
>
> i'd appreciate pointers to examples. the cocoon-examples seem to
> concentrate on repeater-actions mostly...
aah, ignore me.
i've read like a zillion cforms *definitions* and only now realized that
this issue is customarily handled in the *template* (in fact, the
dreamteam example does exactly what i need). sorry for the noise.
jörn
--
jörn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621
if you are a free (as in "free speech") software developer
and you happen to be travelling near my home, drop me a line
and come round for a free (as in "free beer") beer. :-D
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: cforms: conditional row-actions?
Posted by "Robby Pelssers, AGP" <ro...@agp.nl>.
Something like below could solve your issue... Sample code is not tested
though
<ft:repeater id="myrepeater">
<jx:set var="repeaterSize" value="${widget.getSize()}"
<table>
<tbody>
<tr>
<th><ft:repeater-widget-label widget-id="field1"/></th>
<th><ft:repeater-widget-label widget-id="field2"/></th>
</tr>
<ft:repeater-rows>
<tr>
<td>
<jx:if test="${repeaterLoop.index > 0}">
<ft:widget id="delete-button"/>
<ft:widget id="move-up-button"/>
</jx:if>
<jx:if test="${repeaterLoop.index < repeaterSize}">
<ft:widget id="move-down-button"/>
</jx:if>
</td>
</tr>
</ft:repeater-rows>
</tbody>
</table>
</ft:repeater>
-----Oorspronkelijk bericht-----
Van: Jörn Nettingsmeier [mailto:nettings@apache.org]
Verzonden: vrijdag 13 oktober 2006 15:34
Aan: users@cocoon.apache.org
Onderwerp: cforms: conditional row-actions?
hi cocoon folks!
is there a way to add row-actions to repeater rows only if certain
conditions are met?
specifically, i want to do this:
* display a delete button only on the second and following rows, because i
need at least one value.
* display a move-up button only if the current row is not at the top.
* display a move-down button only if the current row is not at the bottom.
i'd appreciate pointers to examples. the cocoon-examples seem to concentrate
on repeater-actions mostly...
thanks in advance,
jörn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org