struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bOOyah <boo...@nowhere.org>
Subject Re: [slightly OT] Any advice for 'jsp.error.useBean.duplicate' ?
Date Sat, 10 Apr 2004 13:14:22 GMT
Joe Hertz wrote:
>>The old 'alternating-table-row-color' trick.
>>No doubt there's a better way of doing that too.
> 
> 
> Thought about using the "one minus 1|0" trick? 
> 
> Initialize some int to 1 or 0:
> 
> int index = 0;
> 
> Then in your loop do:
> 
> index = 1 - index;
> 
> And set the color based upon some two element array based on index:
> 
> color = colorArray[index];

I like that.  Nice.

Thanks for the reply Joe.
--
bOOyah


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


Mime
View raw message