PDA

View Full Version : How to redirect control from one page to another page(Using EXT GWT (GXT))



biswajit.mohapatra80
10 Feb 2012, 11:04 PM
Dear All,

I am new to EXT GWT (GXT), now i am able to create a GWT small project after reading all the documents and follows the process of how to create a GWT Application with Eclipse. but i want to open another complete Page which will have a GXT control after performing a click event on any button of onModuleLoad page.

Kindly share your thought with me regarding the above issues.

Thanks
Biswajit Mohapatra

Colin Alworth
12 Feb 2012, 6:54 AM
If you want to open a new page, try Window.open(...). If you want to load a new page, try Window.Location.assign(...).

subhasisbasu
14 Feb 2012, 11:49 PM
We would like to load/redirect to a new Java page after finishing work on 1st page, not a static html page. Could you please explain how can we do that or provide a sample application?

Colin Alworth
17 Feb 2012, 12:18 PM
By "a new Java page", do you mean a new GWT application? If so, it is just a matter of pointing the url at the new page. If you mean a JSP or some other Java framework for building dynamic pages, again, just pass in the new url.

If you mean to stay on the same page, but load different widgets, this will probably be application specific - they work you have done so far to add widgets to the page will need to be 'undone', and the new widgets added. If you can reuse the main part of the page, you won't need to (or want to) remove everything. If you want to clear everything, one option would be RootPanel.get().clear(), and start adding new widgets.