I have just added two new logic tags to Struts 1.1 which solve this problem.
Those tags are <logic:empty> and <logic:notEmpty>. In essence, 'empty' means
either null or an empty string. So your example would become:
<logic:notEmpty name="myForm" property="searchParam">
show this if property "searchParam" is not equal to ""
</logic:notEmpty>
--
Martin Cooper
----- Original Message -----
From: "Matt Raible" <[EMAIL PROTECTED]>
To: "Struts User" <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 11:17 AM
Subject: NotEqual or Present?
I am trying to check if the user entered a value for a search criteria
in a results page. My ActionForm sets a property to "" if the user did
not enter a value.
So in the following code, I want to only show it if the property does
not equal "". But the following does not work, should it?
<logic:notEqual name="myForm" property="searchParam" value="">
show this if property "searchParam" is not equal to ""
</logic:notEqual>
Thanks,
Matt