Philosophically, I think this belongs in the JSP rather than the taglib,
since it is part of the presentation, and its pretty trivial to do with a
scriptlet. Maybe if you are doing it on a lot of pages it might be worth
putting in a custom taglib for reusibility.

----- Original Message -----
From: "Michael Mok" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 31, 2000 9:07 PM
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
>

Reply via email to