struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7062] - nested:iterate and logic:iterate -- add odd/even and modulus scripting vars
Date Tue, 02 Jul 2002 04:49:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7062>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7062

nested:iterate and logic:iterate -- add odd/even and modulus scripting vars





------- Additional Comments From kevin@henrikson.com  2002-07-02 04:48 -------
Yeah we use some scriptlets to solve this...  I think we should expose an 
optional param like oddEvenId which would be 1 or 0 then we could use 
logic:equal and bean:define to setup what ever other vars we need.


<logic:iterate id="list" name="mp" indexId="count" >
  <bean:define id="oddEven" value="<%= Integer.toString(count.intValue() % 2)%
>"/>
  <bean:define id="cssClass" value="list1"/>
  <logic:equal value="0" name="oddEven" >
    <bean:define id="cssClass" value="list0"/>
  </logic:equal>
 <%-- Rest of looping code --%>
</logic:iterate>

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


Mime
View raw message