>>>>> "GR" == Greg Reddin <[EMAIL PROTECTED]> writes:
GR> We've had success doing this with JSP. The following code snippet may help.
GR> <%
GR> String DARK_COLOR = "DarkColor";
GR> String LIGHT_COLOR = "LightColor";
GR> String currentColor = DARK_COLOR;
GR> int i = 0;
GR> %>
GR> <struts:enumerate id="searchRow"
GR> name="searchForm" property="SearchResults">
GR> <%
GR> if ( i % 2 == 0)
GR> {
GR> currentColor = DARK_COLOR;
GR> }
GR> else
GR> {
GR> currentColor = LIGHT_COLOR;
GR> }
GR> i++;
GR> %>
GR> <TR ALIGN="center" class="<%=currentColor %>">
GR> Thanks,
GR> Greg
Would something like this also work? (same idea, more terse)
<%
String [] colors = {"DarkColor", "LightColor"};
int i = 0;
%>
<struts:enumerate id="searchRow"
name="searchForm" property="SearchResults">
<TR ALIGN="center" class="<%= colors[++i % 2] %>">