Total Pageviews

Monday, August 25, 2008

Reloading the page in Java with GWT

I was looking for the possibility to reload the main page from within my GWT Java client code. After a while searching the GWT mailing list I found this pretty simple solution:

private class MyReloadButtonClickListener implements ClickListener {
  public native void onClick(Widget arg0) /*-{
    $wnd.location.reload();
 
}-*/;
}


Works perfectly!