Meenakshi j wrote:
Hello,
  I am new to struts and would like to change the code below
<logic:iterate indexId="idx" id="director" name="ProposalSummaryForm" property="directors">
  <% if ( ((idx.intValue())%2) == 0 ) { %>
                                        <tr class="evenrow">
                                      <% } else { %>
                                        <tr class="oddrow">
                          <% } %>
  </logic:iterate>
to style class row tags. I am not sure how to do this. Any help would be appreciated.

You'd like to change the code how? Does what you have here not work? Or do you mean you want to get rid of the run-time expressions? If the latter, you may want to consider using JSTL. Something roughly like this may do the trick:

<c:forEach var="director" varStatus="status"
    items="ProposalSummaryForm.directors"/>
  <tr class="${status.index % 2 == 0 ? 'evenrow' : 'oddrow'}">
    ....
  </tr>
</c:forEach>

L.


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

Reply via email to