Reload the page in Java with GWT

1,445 views
Skip to first unread message

BMax

unread,
Jan 23, 2007, 8:33:12 AM1/23/07
to Google Web Toolkit
Hi! How can I reload the main page in Java?
In the main class (that implements EntryPoint), I have a button with a
ClickListener:

private class MyReloadButtonClickListener implements ClickListener {

public void onClick(Widget arg0) {
--> //Here I want reload the page. <--
}

}

Someone can help me?!

Thanks, Max

Ian Bambury

unread,
Jan 23, 2007, 9:27:57 AM1/23/07
to Google-We...@googlegroups.com
That's a bit general, it depends on the design of your app. You could, for example, have the whole site in one class and use
 
site = new Site();
 
Ian

Pavel

unread,
Jan 23, 2007, 10:15:26 AM1/23/07
to Google-We...@googlegroups.com
private class MyReloadButtonClickListener implements ClickListener {
public native void onClick(Widget arg0) /*-{
$wnd.location.reload();
}-*/;
}

Pavel

BMax

unread,
Jan 23, 2007, 10:42:58 AM1/23/07
to Google Web Toolkit
Thanks Pavel, now is perfect!

Bye, Max

Reply all
Reply to author
Forward
0 new messages