Hi,
if you are using an s:iterator, you can do that like this:
<s:iterator id="iteratorId" value="myList" status="status">
<s:if test="#status.odd">
<s:set name="class" value="'rowdark'" />
</s:if>
<s:else>
<s:set name="class" value="'rowlight'" />
</s:else>
<tr class="${class}">
...
</tr>
</s:iterator>
Hope that helps....
Volker
Hi,
Im looking for a nice and easy way to alter the color of every second
textfield.
We are yousing a custom theme to render the textfields including a tablerow.
Is something like this possible?
<s:textfield cssClass="%{++itemcount % 2 = 0 ? blue : red}" ...
Regards
jeto
--
View this message in context:
http://www.nabble.com/-Struts-2--Switching-Color-in-every-row-tp17268950p1726895
0.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail:[EMAIL PROTECTED]
For additional commands, e-mail:[EMAIL PROTECTED]