cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers, AGP" <robby.pelss...@agp.nl>
Subject RE: cforms: conditional row-actions?
Date Fri, 13 Oct 2006 14:18:35 GMT
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 &gt; 0}">
              <ft:widget id="delete-button"/>
              <ft:widget id="move-up-button"/>            
            </jx:if>
            <jx:if test="${repeaterLoop.index &lt; 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


Mime
View raw message