tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <Gin.C...@NielsenMedia.com>
Subject RE: list size from <c:forEach>
Date Thu, 04 Sep 2003 19:54:46 GMT
you can simply set up a var beforehand with the size of the list.
Personally I have always used:

<bean:size id="foo" collection="blah"/>

Look at http://jakarta.apache.org/struts/userGuide/struts-bean.html#size for
the syntax that will solve your particular case.

Now to reference that you can just use ${foo == #} in you EL tests.

-Tim


-----Original Message-----
From: David Chelimsky [mailto:david@chelimsky.org]
Sent: Thursday, September 04, 2003 2:36 PM
To: Tag Libraries Users List
Subject: list size from <c:forEach>


Hi. I need to get the size of a list through which I'm iterating via
<c:forEach> before the last iteration. While I could add a property to my
form bean, I wonder if there's a way to access this from the loop status.
Mime
View raw message