I used a simple java/jsp hack to do this for something similar
(multiple columns for one resultset), but maybe there's a better way.
One thing I noticed is that <bean:define> didn't seem to like
an integer primitive as opposed to a String.

  <%
     int rowCount= 0;
     int columnMod  = 0;
  %>
  <logic:iterate id="rowX" name="data" property="aCollection">
  <%
     columnMod = rowCount% 2;
     rowCount++;
  %>
  <bean:define id="col2Flag" value="<%= String.valueOf(columnMod) %>"/>

  <logic:notEqual value="1" name="col2Flag"><tr></logic:notEqual>
    <td id="textsmall"><bean:write name="rowX" property="someVal"/></td>
  <logic:equal value="1" name="col2Flag"></tr></logic:equal>

</logic:iterate>

<logic:notEqual value="1" name="col2Flag">
     <td></td>
   </tr>
</logic:notEqual>

chris

At 12:00 PM 4/18/2001 -0400, Zeltser, Mark wrote:
>Hello,
>
>I have the following code to build the table:
>============================================================================
>==
>      <logic:iterate id="exchangeRate" name="cache" property="displayRates">
>       <tr>
>         <td class="td0" align="middle">
>           <bean:write name="exchangeRate" property="currency"
>filter="true"/>
>         </td>
>         <td class="td0" align="middle">
>           <bean:write name="exchangeRate" property="rate" filter="true"/>
>         </td>
>         <td class="td0" align="middle">
>           <bean:write name="exchangeRate" property="rateType"
>filter="true"/>
>         </td>
>       </tr>
>     </logic:iterate>
>============================================================================
>==
>
>I would like to set different colors for odd/even rows. How do I do this?
>
>Thanks, Mark.
>
>
>------------------------------------------------------------------------------
>This message is intended only for the personal and confidential use of the 
>designated recipient(s) named above.  If you are not the intended 
>recipient of this message you are hereby notified that any review, 
>dissemination, distribution or copying of this message is strictly 
>prohibited.  This communication is for information purposes only and 
>should not be regarded as an offer to sell or as a solicitation of an 
>offer to buy any financial product, an official confirmation of any 
>transaction, or as an official statement of Lehman Brothers Inc.  Email 
>transmission cannot be guaranteed to be secure or error-free.  Therefore, 
>we do not represent that this information is complete or accurate and it 
>should not be relied upon as such.  All information is subject to change 
>without notice.

Reply via email to