On Monday, October 8, 2012 3:56:57 PM UTC+2, RickL wrote:
>
> There is a workaround, but it is not very elegant.  You can do a 
> driver.flush() in a change handler for the field you want to validate 
> on-the-fly which, of course, re-validates (i.e. calls getValue()) on all 
> fields.  That seems to me a bit like swatting a fly with a sledgehammer.
>
> It would seem better to have, perhaps, another recordError method 
> signature like:
>
> void recordError(String message, Object value, Object userData, boolean 
> immediate);
>
> When immediate is true, the driver would immediately post the error to the 
> nearest super-Editor that implements the HasEditorErrors interface, rather 
> than waiting for a driver flush().
>
> Thoughts?
>>
>>
>>>>
Don't try to abuse the Editor framework for use-cases it's not meant to 
fulfill. What you actually want is some widget that validate the field "as 
soon as possible" and displays the error if any, *and* integrate with the 
Editor framework so that any detected error will also be reported to the 
EditorDelegate.
Either that or flush() at each change.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/QUZvSMTHLVIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to