Thank you so much Laurie. It worked. 

Sandy Kumar
 

-----Original Message-----
From: Laurie Harper [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 21, 2005 4:49 PM
To: user@struts.apache.org
Subject: Re: logic:notEqual

Kumar, Sandy wrote:
> All,
>  
> I am trying to compare a variable with a value set in request
attribute.
> But <logic:notEqual> tag does not accept variable in the "value"
> attribute. It has to be a constant.
> Does anyone know any alternative?.
>  
> Here is my code.
> <logic:iterate id="element" name="WebidViewBean" property="iterator"
> 
> indexId="i">
> 
> <tr>
> 
> <td><html-el:select name="dynaHierarchySelectionForm" multiple="true"
> 
> size="4" property='level${i+1}' >
> 
> <html:option value="All" >Select All</html:option>
> 
> <html:options collection="element" property="webId"
> 
> labelProperty="webIdDescription" />
> 
> </html-el:select></td>
> 
> <td>
> 
> <logic:notEqual value="${i+2}" name="levelDepth" scope="request">
> 
> <html-el:submit property="submit" value="Select Level ${i+2}" />
> 
> </logic:notEqual>
> 
> </td>
> 
> </tr>
> 
> </logic:iterate>
> 
> Thanks,
> Sandy Kumar
> 

Since you're already using JSTL, you should prefer it's tags over
Struts' tags where possible. Try replacing your logic:notEqual with the
following:

   <c:if test="${levelDepth != i+2}">

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to