Is EditorDriver.setConstraintViolations
supposed to propagate EditorError
s to child editors ?
I have OrderEditor
that has nested OrganizationEditor
that has nested ContactPersonEditor
. All my editors implement only HasEditorErrors<>
interface.
So when I call EditorDriver.setConstraintViolations
every editor receives HasEditorErrors.showErrors
call-back but only root OrderEditor
gets container with errors. All nested editors receive the call with empty container.
Is it supposed to work automagically ? Or I have to subclass my driver and traverse through all editors using visitor ? And even if I do I don't understand how I'd push errors to them.
Thanks!
Turns out it doesn't work in GWT 2.4 release. But it seems fixed in trunk version of GWT.
After compiling GWT from sources and debugging in them I discovered that errors are being propagated to the bottommost editors. Therefore if I have EditorA which consists of bunch of ValueBoxEditorDecorators I won't get EditorA.showErrors() call. It will be propagated all the way down.