Showing posts with label struts. Show all posts
Showing posts with label struts. Show all posts

19 February 2008

Determining list size using Struts


This is an exemple showing how to detect the size of a list using struts . We can use the bean:size tag that
define a bean containing the number of elements in a Collection.

<bean:size id="listSize" name="listForm" property="myList">
<nested:iterate property="
myList" indexid="index">
.....
<% if((index.intValue() + 1) == listSize.intValue()) { %>
           End
< % }%>
< /nested:iterate>