as Jorg also mentoined; I'm still using 2.1.4 (and cannot upgrade that 
quickly) so as far as I know I can't use the jx macros in that version
any other possibilities?

thnx,
Gunter





Christoph Hermann <[EMAIL PROTECTED]> 
13/10/2005 09:35
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: repeaters & alternate row colours






Gunter D'Hondt schrieb:

Hello,

> In my form template I'd like to have alternate colours on the repeater 
> rows so that the output is something like 
> <tr id="row1">...</tr>
> <tr id="row2">...</tr>
> <tr id="row1">...</tr>
> ...

Use the JX Macros to do this:
<jx:import
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
...
<jx:choose>
                 <jx:when test="${repeaterLoop.index % 2 == 0}">
                                 <!-- i'm not sure about the %2 == 0 
Syntax, but it should get you
going -->
                                 ...
                 </jx:when>
                 <jx:otherwise>
                 </jx:otherwise>
</jx:choose>

HTH
Christoph

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




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

Reply via email to