Issue Details (XML | Word | Printable)

Key: STR-2319
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Paul Benedict
Reporter: Nuno Furtado
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Validator validwhen comparisons of floats

Created: 29/Dec/04 12:15 PM   Updated: 26/Aug/07 11:45 PM
Return to search
Component/s: Core
Affects Version/s: 1.2.2
Fix Version/s: 1.4.0

Environment:
Operating System: All
Platform: PC
Issue Links:
Reference
 

Bugzilla Id: 32871


 Description  « Hide
I needed to validate a field if another one was diferent than zero, it should be
expected that i was able to do it like so :
<field property="outros" depends="validwhen">
<arg2 key="compostagemdataForm.outros.invalido"/>
<var>
<var-name>test</var-name>
<var-value>(qtoutros==0)</var-value>
</var>
</field>

For some reason this rule allways failed. i had to reformulate the rule :
<field property="outros" depends="validwhen">
<arg2 key="compostagemdataForm.outros.invalido"/>
<var>
<var-name>test</var-name>
<var-value>(qtoutros=='0.0') </var-value>
</var>
</field>

wich is weird! qtoutros is a String property on the bean, but can be converted
to float.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order