struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jana Navaneethan" <jana.navaneet...@labs.gte.com>
Subject Collection iterate question!
Date Thu, 05 Dec 2002 15:57:52 GMT
Hi ,
        I have a collection in my JSP, I want to iterate this collection and
display even rows only. Is there a way to do this?
Any help would be greatly appreciated!

Thanks in advance,
Jana.

<%
  java.util.ArrayList paymentListOdd = new java.util.ArrayList();
  paymentListOdd.add("American Express");
  paymentListOdd.add("Credit Terms Available");
  paymentListOdd.add("Diner's Club");
  paymentListOdd.add("Mastercard");
  paymentListOdd.add("Financing Available");
  paymentListOdd.add("Traveler's Check");
  pageContext.setAttribute("paymentListOdd", paymentListOdd,
PageContext.PAGE_SCOPE);
%>

<logic:iterate id="OddLabel" name="paymentListOdd">
     <tr>
            <td width="120">&nbsp;</td>
      <td width="230" valign="top"> <b><font face="Arial, Helvetica,
sans-serif" size="2">
      <html:multibox property="paymentOptions"><bean:write
name="OddLabel"/></html:multibox>&nbsp;<bean:write
name="OddLabel"/></font></b></td>
</logic:iterate>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message