You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Rizvi, Suhel" <Su...@virgin-energy.co.uk> on 2001/12/03 17:36:38 UTC
RE: Comparing two variables using logic:equal
Yes you are right it was a typing error on my part.
I have now found the solution to the problem. You haev to convert the
variables you are comparing to String. I had to use the following :
<% int testVar = 2 %>
<logic:equal name="theBean" property="someBeanProperty"
value="<%=Strign.valueOf(testVar)%>">
.... do something .....
</logic:equal>
-----Original Message-----
From: Brian Holzer [mailto:bholzer@sgi.sk.ca]
Sent: 20 November 2001 15:55
To: struts-user@jakarta.apache.org
Subject: Re: Comparing two variables using logic:equal
Wouldn't you want to have your value clause look like this
value="<%=testVar%>"> rather than value="<%=i%>">
>>> Suhel.Rizvi@virgin-energy.co.uk 11/19/01 06:22am >>>
I am trying to compare a bean property with a variable or another bean
property using the logic:equal tag but its not working.
e.g. 1
<% int testVar = 2 %>
<logic:equal name="theBean" property="someBeanProperty" value="<%=i%>">
...... do something .......
</logic:equal>
Is there a way to do this ?
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>