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
Don Brown made changes - 23/Apr/06 04:49 AM
Field Original Value New Value
issue.field.bugzillaimportkey 32871 27610
Paul Benedict made changes - 25/Aug/07 04:52 PM
Link This issue is related to STR-2321 [ STR-2321 ]
Paul Benedict made changes - 26/Aug/07 11:45 PM
Priority Minor [ 4 ] Major [ 3 ]
Assignee Struts Developers [ dev@struts.apache.org ] Paul Benedict [ paul4christ79 ]
Affects Version/s Future [ 21701 ]
Affects Version/s 1.2.2 [ 21695 ]
Fix Version/s 1.4.0 [ 21795 ]
Summary [validator] Validwhen and floats(maybe integers) Validator validwhen comparisons of floats
Paul Benedict made changes - 26/Aug/07 11:45 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]