<logic:iterate id="id" property="dp" name="YourFormBean" indexId="idx" >
<tr >
<c:choose>
<c:when test="${idx%2==0}">
<td class="tdContent" >
</c:when>
<c:otherwise>
<td class="tdContent2" >
</c:otherwise>
</c:choose>
<html-el:multibox property="checkboxList"
onclick="unCheckIt()" value="${id.index}" />
</td>...............and so on
notes : class=tdContent2 or class=tdContent defines in css
----- Original Message -----
From: "Erik Weber" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 10, 2004 12:48 PM
Subject: EL question
> I have a logic:iterate tag that is creating HTML table rows.
>
> I want to set a bgcolor variable to use for each row. If the row is even
> numbered, I want to use color A. If the row is odd numbered, I want to
> use color B.
>
> What tags should I use? What EL operation should I use to determine if
> the current iterator index is even or odd?
>
> I was thinking along the lines of:
>
> begin logic:iterate
> set bg color var to 'A'
> if iterator index is odd, set bg color to 'B'
> render the table row
> end logic:iterate
>
> I would appreciate some advice on how to implement this neatly, using
> the EL tags or JSTL tags. I'm trying to graduate from using scriptlets
> for stuff like this.
>
> Thanks,
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]