tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Fereira <ja...@cornell.edu>
Subject Re: <c:if test="${nc.readyDate !=''}">
Date Thu, 07 Apr 2005 17:11:14 GMT
At 01:02 PM 4/7/2005 -0400, you wrote:
> > <c:if test="${nc.readyDate !=''}"> seems to
> > always return true  whether it contains a value or not..
> >
> > how should i rewrite the test?
>
>Use the empty operator. ${empty nc.readyDate} will return true if
>readyDate has not been populated.

It also has the advantage of returning false if the object is null (instead 
of producing a NullPointerException).



>-Rahul


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