Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Logout Refresh

    Hello,

    I'd like to refresh the page when a user clicks on the logout button. I'd rather not just hide elements or destroy them. I just want a clean refresh/reload of the entire page. I can't seem to find a method to do that. Any suggestions?

    #2
    Hi, you can use something like this
    Code:
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.Window;
    .
    .
    // button click event
    Window.Location.assign(GWT.getHostPageBaseURL() + "index.jsp");
    if your index.jsp is your welcome page with gwt.

    Comment


      #3
      call java script redirect from logout btn

      or try this

      Code:
          public static native void redirect(String url)/*-{
          $wnd.location = url;
          }-*/;
      
      //from Logout btn event
              redirect(GWT.getHostPageBaseURL());

      Comment


        #4
        com.google.gwt.user.client.Window.Location.reload();

        Comment

        Working...
        X