Hi,
I'm creating the effect like this:
<% int count=0; %>
<struts:iterate id="row" name="currentReport" property="data" >
<tr BGCOLOR='<%= (count++ % 2==0 ?"#FFFFAA":"#EEEEEE") %>' >
<td> <%= count %> </td>
<struts:iterate id="item" collection="<%= row %>" >
<td nowrap align=MIDDLE > <%=(item).toString() %> </td>
</struts:iterate>
</tr>
</struts:iterate>
ingo
> -----Original Message-----
> From: Michael Mok [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 31, 2000 6:07 PM
> To: [EMAIL PROTECTED]
> Subject: Alternating colors for rows displayed?
>
>
> Hi,
>
> I am using the <logic:iterate> tag to loop through my SQL
> query result and
> displaying them. Is there a way to display the rows such that they are
> displayed with different colors (eg odd rows blue even rows red)?
>
> I thought of coding additional java code in the JSP page to
> sett the color
> of the row (I am displaying my rows in a HTML
> <table><tr><td></td></tr></table>)within the <logic:iterate>.
>
> Maybe an enhancement can be made to the <struts:logic> tag to
> take a style
> sheet setting for specifying a row color combination of some
> sort or a new
> <struts:logic-table> tag for displaying collections.
>
> Any opinion?
>
> Michael Mok
>