struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeto <j...@gmx.at>
Subject RE: [Struts 2] Switching Color in every row
Date Fri, 16 May 2008 10:30:01 GMT


Volker Karlmeier wrote:
> 
> 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
> 
> 

Thanks for your help but I m not using an iterator in this table.


-- 
View this message in context: http://www.nabble.com/-Struts-2--Switching-Color-in-every-row-tp17268950p17271734.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message