Tuesday September 30, 2003
Struts tip o' the day ~ using bean:size
A co-worker turned me on to this one today - you can use <bean-el:size collection="${myForm.list}" id="listSize"/> to get the size of a collection and expose it as a pageContext variable. I've been looking for this sucker for years! Usually, I end up putting a getListSize() getter on my form to accomplish this, since none of the other tags (including JSTL) allow you to get the size of a collection.
Posted in Java
at Sep 30 2003, 07:25:59 PM MDT
6 Comments
Search This Site
Recent Entries
- Secure JSON Services with Play Scala and SecureSocial
- My What's New in Spring 3.1 Presentation
- Twitter's Open Source Summit: Bootstrap 2.0 Edition
- Refreshing AppFuse's UI with Twitter Bootstrap
- 2011 - A Year in Review
- Upgrading AppFuse to Spring Security 3.1 and Spring 3.1
- What have I been working on at Taleo?
- Our Engaging Trip to Paris and Antwerp
- My HTML5 with Play Scala, CoffeeScript and Jade Presentation from Devoxx 2011
- Deploying Java and Play Framework Apps to the Cloud with James Ward
Posted by Yann Cebron on October 01, 2003 at 10:52 AM MDT #
<c:if test=${bean.children[3] != null}>there are at least 4 children</c:if> <c:if test=${bean.children[0] != null}>the children list is not empty</c:if>Posted by Jacob Hookom on December 02, 2003 at 11:24 AM MST #
<c:if test=${bean.children[3] != null}>there are at least 4 children</c:if> <c:if test=${bean.children[0] != null}>the children list is not empty</c:if>Posted by Jacob Hookom on December 02, 2003 at 11:27 AM MST #
Posted by Bill Schneider's Weblog on September 04, 2005 at 08:10 AM MDT #
Posted by Steve on October 25, 2008 at 07:25 AM MDT #
Posted by Benoit Guerout on February 11, 2009 at 09:56 AM MST #