]> source.dussan.org Git - vaadin-framework.git/commitdiff
Changed window close behavior to not disable browser-level windows when closing them...
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 3 Sep 2008 17:52:52 +0000 (17:52 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 3 Sep 2008 17:52:52 +0000 (17:52 +0000)
svn changeset:5353/svn branch:trunk

src/com/itmill/toolkit/ui/Window.java

index e8201d4fdf451539af6c1cbadc7c55fe14450ad7..f1c5346e967bfd91437c615d983848a9c7206d65 100644 (file)
@@ -841,10 +841,22 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
     }
 
     /**
-     * Method that handles window closing (from UI). If one wants to have window
-     * that cannot be closed (with server side check), override this with and
-     * empty method. Main window of the application can not be closed (on the
-     * server-side).
+     * Method that handles window closing (from UI).
+     * 
+     * <p>
+     * By default, sub-windows are removed from their respective parent windows
+     * and thus visually closed on browser-side. Browser-level windows also
+     * closed on the client-side, but they are not implicitly removed from the
+     * application.
+     * </p>
+     * 
+     * <p>
+     * If one wants change the default behavior, register a window close
+     * listenter and do something else. For example, you could re-open the
+     * browser-level window with mainWindow.open(), re-add the removed
+     * sub-window back to its parent or remove browser-level window
+     * automatically from the application.
+     * </p>
      */
     protected void close() {
         if (getApplication() != null
@@ -853,7 +865,6 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
         }
         Window parent = (Window) getParent();
         if (parent == null) {
-            setVisible(false);
             fireClose();
         } else {
             // subwindow is removed from parent