Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bug: No negative values when SimpleType "localeFloat" is used

$
0
0
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:
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();
            }
        } );

Thanks
Andy

Viewing all articles
Browse latest Browse all 4756

Trending Articles