Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319938 - DecimalTextRidget - wrong range validation result with null value
Summary: DecimalTextRidget - wrong range validation result with null value
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: ridget (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.0.0.M2   Edit
Assignee: Elias Volanakis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 23:27 EDT by Elias Volanakis CLA
Modified: 2010-10-29 06:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Volanakis CLA 2010-07-14 23:27:23 EDT
To reproduce: 

1. use a DecimalTextRidget that is bound to a new DoubleBean(null)
2. add a ValidRange(0.0, 10.0) or ValidRangeAllowEmpty(5.0, 10.0) rule with ValidationTime.UPDATE_ON_MODEL. Both rules accept null (null equiv. zero equiv. empty). 
3. invoke ridget.updateFromModel()

Result: the error marker is set
Excpected: the error marker should not be set.

---

The cause is that DecimalTextRidget overrides getText() to perform some formatting on the internal string. This is missed when manually verifiying the value in updateFromModel() since it accesses the value directly.
Comment 1 Elias Volanakis CLA 2010-07-14 23:27:43 EDT
Fixed in HEAD.