how do i clear constraintViolations from the editor?

21 views
Skip to first unread message

Elhanan

unread,
Dec 4, 2011, 8:37:36 AM12/4/11
to Google Web Toolkit
hi..

i'm using editor framework along side request Factory and validations
on server side.

if i try to input a value which does not conform to validation rules i
get an error, however, i re-bind editor (for each edit, i do a ,
GWT.create(Driver), Driver.initilize,Driver.edit(proxy,rf) the errors
on the decorators still remain

i have to to do a Driver.setConstraintViolationsn(New ArrayList()) for
them to be cleared, isn't there a better way?

Thomas Broyer

unread,
Dec 4, 2011, 2:01:46 PM12/4/11
to google-we...@googlegroups.com
No (except using the Collections.emptyList() singleton instead of a new ArrayList ;-) ), but you can open a request for enhancement, so that e.g. a driver.initialize() (or maybe edit() with a different value as before, but it would break apps calling setConstraintViolations before edit) automatically calls showErrors on widgets with an empty list (similar to doing a setConstraintViolations(emptyList()) automatically)
Reply all
Reply to author
Forward
0 new messages