I just created a RowToggler class with a getValue() method that returns
an alternating value each time you call it. Then, in JSP, I do:

<jsp:useBean id="rowToggler"class="com.mycompany.RowToggler"/>

and on each table row:

<tr class="<bean:write name="rowToggler" property="value"/>" />

which gives alternating rows different CSS class names. This especially
works better than scripting if the data in the rows of the table aren't
things that you can iterate through. Put 10 different things in the
table, reorder them, it doesn't matter.

And MUCH easier than a custom tag.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to