Announcement

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

    Prevent removal of decimal part of input in DataSourceIntegerItem

    In the example of https://www.smartclient.com/smartgwt...alidation_type, is it possible to also fail the validation if the entered integer contains decimals? In the example, if an integer like "3.14" is entered, the validation succeeds and only "3" is kept.

    #2
    You could have a less restrictive FormItem that allows decimal values and do the rounding in the .ds.xml validator's ValidationContext.setResultingValue().
    Perhaps you could also do it in a editorExitHandler or changedHandler on the less restrictive FormItem, but I'd like the other way better.

    Best regards
    Blama

    Comment

    Working...
    X