I am having problems using condition custom tag, based on jakarta struts 1.0
In the example below , the "balance_Amount" is string ( in form bean). The value I compare is with is double ( 0.1).
how do i go about writing?
The below code is not working. what are the laternatives I have here like logic:greaterThan tag?
<xx:condition> <xx ataValue fieldName="balance_Amount"/> > "0.1" </xx:condition>
[ February 11, 2006: Message edited by: frank xxx ]
Here's a link to the 1.0 version of these tags:
You also have the option of using Java Standard Tag Library (JSTL) for this logic.
Well, when I say <XX:if > its a custom tag and XX stands for company name.
I didnot want to mention that. But How could I use that conditin tag?
I checked the tld file theres nothing there except for definition. No attribues or anything.
How could I use <logical: greaterThan> tag to compare a string value ( eg. "2.0" )to a double value 0.1?
The balance type in my bean account is string.
<logical: greaterThan> name="account" property="balance" value="0.1"
Tnanks for you help?
Regarding the <logic:greaterThan> tag, the answer to your question is in the link that I gave you:
Each of the value comparison tags takes a value and compares it to the value of a comparison attribute. If the value given can be successfully converted to a float or double, then a number comparison is performed on the value given and the value of the comparison attribute. Otherwise a String comparison is performed.
Even if the property is a string, the tag does a number comparison if it can.