Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About JSTL, EL and size Collections

 
Rafael Afonso
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
In my JSP page, I have a bean that is a Collection. I am using a <c:choose> tag. To verify if my Collection is empty I do this:

Now, If I want verify size Collection I do not do this:

because there is not getSize() method for Collections, but size(). Does EL allow a alternative? Or must I use <c_rt:when> like:

Thanks,
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am very sure that you only can use the twin
rtexprvalue library c_rt.
..or if you access minhaColecao as a bean attribute you may save the size of your collection as an extra attribute is that bean.
[ February 26, 2003: Message edited by: Axel Janssen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic