user411103
user411103

Reputation:

GWT: Cannot keep control of Window anymore once I close its pop-up

My app is:

  1. Doing something on main window
  2. Opening a new window to do something there

    Window.open(userInfo.signInURLs.get("Google"), "Google", null);
    
  3. Closing that new window

    native public static void close()/*-{ $wnd.close(); }-*/;
    
  4. Trying to reload the main window

    Window.Location.reload();
    

Everything is fine until I close the new windows. I cannot keep control of the main window anymore. Actions I run are never executed. Any ideas?

Upvotes: 1

Views: 513

Answers (1)

Sam
Sam

Reputation: 2747

If you work with GWT you want as faw page reload as possible. If you load data you make partial page reloads using ajax. The approach you have chosen is not very feasible. With window.location.reload - you make a whole page reload. Don't do that.

You should use a modal window - in gwt that is very simple. Use DialogBox, that makes a modal Window.

http://examples.roughian.com/index.htm#Widgets~DialogBox

Upvotes: 1

Related Questions