You cant do that with the struts NotEqualTag .... you can however with the IF/THEN/ELSE tags I wrote which Ted Husted has posted on his site:
 
 
 
<logic:if    name="myForm" property="property1" op="NotEqual" value ="xxx">
<logic:and name="myForm" property="property2" op="NotEqual" value ="xxx"/>
<logic:and name="myForm" property="property3" op="NotEqual" value ="xxx"/>
 
  <logic:then>
      .............
  </logic:then>
 
  <logic:else>
      ............
  </logic:else>
 
</logic:if>
 
 
Niall
 
 -----Original Message-----
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: 03 July 2001 17:35
To: Struts User
Subject: NotEqual Tag to compare multiple properties to a value

Is it possible to use the notEqual tag to compare multiple properties to a single value?
 
I'd like to write code similar to the following
 
<logic:notEqual name="myForm" properties="property1,property2" value="">
    do something if either property not equal to ""
</logic:notEqual>
 
Thanks,
 
Matt
 
P.S.  I figured out my issue below - it was an iPlanet bug.  For value, I used value="<%=""%>" and it worked as expected.
----- Original Message -----
Sent: Monday, July 02, 2001 12:17 PM
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

Reply via email to