tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsolt <zkoppanyl...@intland.com>
Subject Re: How can I get the size of a java.util.List class from JSTL?
Date Thu, 22 Jan 2004 18:56:02 GMT
Thank you!

Zsolt

Hans Bergsten wrote:
> Zsolt wrote:
> 
>> Hi,
>>
>> how can I replace the code below with a JSTL command ?
>>
>> (scc_history points to a java.util.List class).
>>
>> <bean:size id="nr_of_scc_history" name="scc_history" />
> 
> 
> With JSP 1.2 and JSTL 1.0, there's no way to get the size, only
> to check if it's empty:
> 
>   <c:if test="${empty scc_history}">
> 
> With JSP 2.0 and JSTL 1.1, you can use the length() function:
> 
>   <c:set var="nr_of_scc_history" value="${fn:length(scc_history)}"/>
> 
> Hans



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message