cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Duroc <nicolas.du...@gmail.com>
Subject repeaterLoop in repeater-rows
Date Wed, 07 Jun 2006 10:38:56 GMT
Hi,

In the online cocoon documentation, I've found :

http://cocoon.apache.org/2.1/userdocs/widgets/widget_repeater.html#From+Cocoon+
2.1.8

I'm using cocoon 2.1.9, I have a table, and I would like to apply a style on 
alternative rows, so I've taken as example the following code :

<ft:repeater id="myrepeater">
  <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 class="forms-row-${repeaterLoop.index % 2}">
          <td><ft:widget id="field1"/></td>
          <td><ft:widget id="field2"/></td>
        </tr>
      </ft:repeater-rows>
    </tbody>
  </table>
</ft:repeater>

The repeater works, but the "repeaterLoop" is not evaluated, and the obtained 
table contains <tr class="forms-row-${repeaterLoop.index % 2}">.
I've seen in previous posts that I had to include the following jx statement :
<jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>

I have included it, but it doesn't work better. In the example, they don't use 
any jx tags in the repeater. Is the example correct ? 

Thanks in advance

Regards,

Nicolas Duroc


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message