Announcement

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

    ListGrid Cell Validation on Exit?

    I have a ListGrid setup like the "Custom Cell Editors" showcase: http://www.smartclient.com/smartgwt/showcase/#grid_custom_editing_cell

    I added an IntgerRangeValidator but it does not validate if I setValidatieOnExit(Boolean.TRUE) and only validates if I use setValidateOnChange(Boolean.TRUE). I do not like how the validate on change behaves so I really want to just use validate on exit. Any reason why that is not working or am I doing something wrong?

    Code:
    IntegerItem integerItem = new IntegerItem();
    IntegerRangeValidator validator = new IntegerRangeValidator();
    validator.setMin(5);
    validator.setMax(60);
    integerItem.setValidators(validator);
    integerItem.setValidateOnExit(Boolean.TRUE);
    I have tried this on the latest 4.0d June 4th SmartGWT code base.

    #2
    I changed where the validator was set. Instead of setting int on the IntegerItem, I set it on the ListGridField and the validation is now called before save.

    That works for me fine.

    Comment

    Working...
    X