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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "About JSTL, EL and size Collections" Watch "About JSTL, EL and size Collections" New topic
Author

About JSTL, EL and size Collections

Rafael Afonso
Ranch Hand

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


=================================<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
 
Similar Threads
jsp: include not working...
[JSTL] How to call a method inside an attribute?
NOT EMPTY or NOT NULL?
Problem Using c:when test
Comparing ints using EL