On Friday, October 25, 2013 7:10:52 AM UTC+2, Akshay Lokur wrote:
Hey Thomas,
Thanks for your suggestion.
Could you please let me know, how can I catch the exception which form.submit() throws? A small code snippet would be great to understand.
try {
formPanel.submit() {
} catch (Throwable t) {
// oops!
}
Obviously won't works if you use a SubmitButton rather than calling .submit() yourself, or the user manages to submit the form via the native browser handling of the enter key rather than clicking your button.
Needless to say: this is fragile and is therefore not a "solution" to the problem. My recommendation is to use a SubmitButton rather than a Button with a ClickHandler that calls submit, just because clicking the button is not the only way to submit the form anyway. So you'd better try to find another way of detecting the "problem".
(using Flash or Silverlight in IE8 might be better, and HTML5 APIs in other browsers which give you complete control/feedback on what happens)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment