Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug: Validation of DoubleItems returns true

    Hi,

    this bug appears in 5.1p and 6.0p. If you use a DoubleItem with the code on the bottom... it does not validate the field values it seems always to return true if you call "form.validate()". You can enter allmost every value you want.

    Currently (Locale EN):
    1000.00 => true
    1,000.00 => true
    1000 => true
    1000,00 => true
    1.000,00 => true
    1,000,00 => true

    Correct (Locale = EN):
    1000.00 => true
    1,000.00 => true
    1000 => true
    1000,00 => false
    1.000,00 => false
    1,000,00 => false

    Currently (Locale = DE)
    1000,00 => true
    1.000,00 => true
    1000 => true
    1000.00 => true
    1,000.00 => true
    1.000.00 => true

    Correct (Locale = DE)
    1000,00 => true
    1.000,00 => true
    1000 => true
    1000.00 => false
    1,000.00 => false​
    1.000.00 => false

    [CODE]
    final DoubleItem item = new DoubleItem( "Amount", "Amount" );
    item.setType( "localeDouble" );
    item.setDecimalPrecision( 2 );item.addClickHandler( new ClickHandler()
    {
    @Override
    public void onClick( ClickEvent event )
    {
    item.selectValue();
    }
    } );
    return item;
    item.setDecimalPad( 2 );
    item.setWidth( "*" );
    item.setDefaultValue( new Double( 0 ) );
    [CODE]

    #2
    Sorry you can delete post... my form did not have a DataSource... works fine now!!!

    Comment

    Working...
    X