struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roberto Nunnari <roberto.nunn...@supsi.ch>
Subject Re: S2 substitute for jstl empty operator
Date Sat, 16 Jun 2007 19:12:00 GMT
Roberto Nunnari wrote:
> Hello again..
> 
> Another question..
> 
> in JSTL I can write:
> 
> <c:if test="${!empty myvar}">...</c:if>
> The empty operator tests for null, empty strings and empty arrays..
> 
> if in S2 I type:
> <s:if test="%{!empty myvar}">...</s:if>
> it doesn't work.

humm... it seams that:
<s:if test="%{myvar}">
suffices for testing null..

is that the correct usage? Best practices for the original problem?


> 
> Is there in S2 a substitute for the JSTL EL operator empty?
> And for the ! operator?
> 
> Sorry for all the questions, but I couldn't find an answer in the S2 site.
> 
> Best regards.
> 
> -- 
> Robi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Mime
View raw message