How to open GWT page from another GWT page?
I created a login page in GWT using widgets and RPC. After succesful login, i want to display another page that also uses GWT widgets (i will use Google Chart Tools Library 1.1). I'm using GWT plugin for Eclipse that creates some f开发者_C百科olders when starting new projects(server,client....). How to display second GWT page from the first one? I have seen this (GWT multi modules for separate HTML pages?), is this the right way?
One way to do that can be that upon login succes, the server send you back an url and you open this url on your client side (onSucess) by changing the location of the current window :
Window.open(YOUR_URL_TO_OTHER_GWT_PAGE, "_self", "");
or (better) :
public static native void changeWindowLocation(YOUR_URL_TO_OTHER_GWT_PAGE)/*-{
$wnd.location.href = url;
}-*/;
精彩评论