Volker Karlmeier wrote:
> 
> Hi,
> 
> then you could have this managed by your action class creating
> a getter method for your counter.
> 
> Maybe something like that:
> 
> Action.class:
> 
> public void initCounter() {
>   this.counter=0;
> }
> 
> public int getCounter() {
>    return counter++;
> }
> 
> 
> Your JSP:
> 
>  <s:if test="counter%2!=0">
>    <s:set name="class" value="'rowdark'" />
>  </s:if>
>  <s:else>
>    <s:set name="class" value="'rowlight'" />
>  </s:else>
>  
> 
> Might work :)
> 
> Volker
> 
> 

Yes you are right...might work :-) but not very nice. Putting such things
into an action is not the right way I think. Is there no way doing this with
freemarker themes.  
-- 
View this message in context: 
http://www.nabble.com/-Struts-2--Switching-Color-in-every-row-tp17268950p17275594.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]

Reply via email to