varStatus is good here too, it can give you the "count" of the current iteration. With that, for example, you can do a modulo 2 operation for alternating bgcolors or style classes.
-Rahul "Scott Purcell" <[EMAIL PROTECTED]> wrote on 05/26/2005 12:58:20 PM: > Hello, > I have this scenario come up occasionally, and have to opt to JSP > expressions on the page for a work-around. > > <c:choose> > <c:when test="${assetCollection == null}"> > nothing > </c:when> > <c:otherwise> > <c:forEach var="asset" items="${assetCollection}"> > > > BODY > > > <c:out value="${asset.assetId}" /> > </c:forEach> > </c:otherwise> > </c:choose> > > > In the forEach section, I am going to create a rows in a table which > will be different colors for each row. How can I put in a counter > that I can then change the row color for? Basically, I would like to > know what asset I am on in the body. > > Thanks, > Scott > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >