wood burning stoves
The moose likes JSP and the fly likes About JSTL, EL and size Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "About JSTL, EL and size Collections" Watch "About JSTL, EL and size Collections" New topic

About JSTL, EL and size Collections

Rafael Afonso
Ranch Hand

Joined: Jul 16, 2002
Posts: 63
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:


=================================<br /> Rafael U. C. Afonso<br /> <a href="http://www.javafree.com.br" target="_blank" rel="nofollow">www.javafree.com.br</a><br />=================================<br /><i>Where is debug?<br />debug is on the table</i>
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
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 ]
I agree. Here's the link: http://aspose.com/file-tools
subject: About JSTL, EL and size Collections
jQuery in Action, 3rd edition