tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Leme <jakartalis...@felipeal.net>
Subject Re: calling a method in c:if tag
Date Thu, 27 May 2004 23:19:35 GMT
On Thu, 2004-05-27 at 20:04, Barnett, Brian W. wrote:
> I have a List object as a request scoped variable and I want to call a
> method on it as the test of a c:if statement. Is this a "no no"? 
 
No, this is a "no yes" :-): no, you can't do it on JSTL 1.0, but yes,
you can on JSTL 1.1, using EL functions.


> What I really want to do is something like this:
> 
> <c:if test="${schoolList.size() > 0}">.

On JSTL 1.1, you could use:

<c:if test="${fn:length(schoolList) > 0}">

BTW, there is a similar example on Sun's Web Service tutorial:

http://java.sun.com/webservices/docs/1.3/tutorial/doc/IntroIWA5.html



Felipe



---------------------------------------------------------------------
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