You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laszlo Borsos <bl...@freemail.hu> on 2007/08/16 09:03:40 UTC

empty operator

In OGNL, how can I assert that a String property is not null or empty?

I would like this functionality:
${!empty bean.string}


kuvera


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


RE: empty operator

Posted by Al Sutton <al...@alsutton.com>.
I tend to use 

empty eq null

To test if it's null and;

empty neq null

For non-null

-----Original Message-----
From: Laszlo Borsos [mailto:bl2006@freemail.hu] 
Sent: 16 August 2007 08:04
To: Struts Users Mailing List
Subject: empty operator


In OGNL, how can I assert that a String property is not null or empty?

I would like this functionality:
${!empty bean.string}


kuvera


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