tags:

views:

53

answers:

3

I have a simple web form written in Google web toolkit. I want the user to follow a new URL when he clicks on the submit button. However I cannot find any examples of redirecting the user to a new URL from within GWT code. How may I achieve this?

A: 

You can have a look at example at roughain http://examples.roughian.com/index.htm#Panels~FormPanel

Also you can read javadoc @http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/ui/FormPanel.html

To make user go to a url use setAction method of FormPanel

Gaurav Saxena
+1  A: 

To redirect the user to a new page, use Window.Location.assign().

To have this happen when the user submits the form, use FormPanel.addSubmitHandler() , or addSubmitCompleteHandler() to have the redirect happen when the form submission is complete.

Jason Hall