struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slattery, Tim - BLS" <Slattery....@bls.gov>
Subject RE: logic:iterate question
Date Fri, 06 Feb 2004 14:29:10 GMT
> i have a question about the <logic:iterate> tag. My tag 
> iterates over an ArrayList which contains an amount of beans. 
> However, in the last iteration i want to perform some special 
> action. My current code looks something like this:
> 
> <logic:iterate id="foo" name="bar" scope="session" indexId="index">
> 
>     ...
>     <logic:equal value="..." name="index">
>         ...
>     </logic:equal>
> 
> </logic:iterate>

This is something that JSTL does *extremely* well:

<c:forEach items="foo.bar" var="bar" varStat="stat">
   <c:if test="stat.last">
       <do what needs to be done
   </c:if>
 
</c:forEach>

--
Tim Slattery
Slattery_T@bls.gov


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


Mime
View raw message