Thursday, April 18, 2013

Re: FormPanel.SubmitEvent cancel not working



On Thursday, April 18, 2013 9:30:51 AM UTC+2, Honza Rames wrote:
A little out-of-time response but since this problem still exists in 2.5 I think it's worth sharing another solution. 

If you put "javascript:" into form's action attribute, nothing will happen even if the event is not canceled. I know this isn't helpful in cases where you need to validate the form, but in case you (like me) are preventing the form submit to send the data using GWT RPC instead of the POST to take advantage of the browser's password remembering feature (I'm wrapping FormPanel around already existing form) this is actually helpful.

Last time I tried, you had to let the submission go through, so you'd have to use action="javascript:foo()" and expose a method as $wnd.foo via JSNI where you'd do your RPC.
That was 4 years ago though! https://groups.google.com/d/topic/google-web-toolkit/KyzgtqqoJGE/discussion 

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate