Hello,
it is currently not possible for the user to enter negative values when the simpleType "localeFloat" is used. item.getValueAsFloat() always removes the "-" in front of the number.
Entered Value => 400 => item.getValueAsFloat() => 400
Entered Value => -400 => item.getValueAsFloat() => 400
Used SmartGWT 4.1p Latest
I used the following code:
Thanks
Andy
it is currently not possible for the user to enter negative values when the simpleType "localeFloat" is used. item.getValueAsFloat() always removes the "-" in front of the number.
Entered Value => 400 => item.getValueAsFloat() => 400
Entered Value => -400 => item.getValueAsFloat() => 400
Used SmartGWT 4.1p Latest
I used the following code:
Code:
FloatItem item = new FloatItem( "amount", "Amount" );
item.setType( "localeFloat" );
item.setDecimalPrecision( 2 );
item.setDecimalPad( 2 );
item.setWidth( "*" );
item.setDefaultValue( new Float(0) );
item.addClickHandler( new ClickHandler()
{
@Override
public void onClick( ClickEvent event )
{
item.selectValue();
}
} );Andy