litesoft
Diff Revisions
609
vs
610
for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/forms/client/nonpublic/AbstractNumericRequireableAttributeAdapter.java
|
@@ -22,12 +22,10 @@ |
22 |
22 |
|
UiInputDef pUiDef, NumericMetaData pMD ) |
23 |
23 |
|
{ |
24 |
24 |
|
super( pComponentHandler, pMD, createFC( pUiDef, pMD ) ); |
25 |
|
- |
if ( (null != (mDecimalPlaces = pMD.getDecimalPlaces())) && // |
26 |
|
- |
((mDecimalPlaces.intValue() < 0) || (mDecimalPlaces.intValue() > 20)) ) |
|
25 |
+ |
if ( null != (mDecimalPlaces = pMD.getDecimalPlaces()) ) |
27 |
26 |
|
{ |
28 |
|
- |
int i = Math.abs( mDecimalPlaces.intValue() ); |
29 |
|
- |
mDecimalPlaces = new Integer( (i > 20) ? 20 : i ); |
30 |
|
- |
} |
|
27 |
+ |
mDecimalPlaces = Math.min( Math.abs( mDecimalPlaces.intValue() ), 20); |
|
28 |
+ |
} |
31 |
29 |
|
if ( null == (mFormatControl = pMD.getFormatControl()) ) |
32 |
30 |
|
{ |
33 |
31 |
|
mFormatControl = NumericFormatControl.JUST_DOT; |