]> source.dussan.org Git - vaadin-framework.git/commitdiff
subwindows now send attach events & works with focus correctly
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 30 Aug 2007 10:04:27 +0000 (10:04 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 30 Aug 2007 10:04:27 +0000 (10:04 +0000)
svn changeset:2154/svn branch:trunk

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

index 48115ffb0dae8910639ac9b2e87abc93c2991159..3ac97df3523bbe21c1a6a566edfa438ad895b5cf 100644 (file)
@@ -252,7 +252,7 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
         * @return the Value of property parent.
         */
        public final Component getParent() {
-               return null;
+               return super.getParent();
        }
 
        /**
@@ -823,8 +823,11 @@ public class Window extends Panel implements URIHandler, ParameterHandler {
         *            the Focused component or null if none is focused.
         */
        public void setFocusedComponent(Component.Focusable focusable) {
-               this.application.setFocusedComponent(focusable);
-               this.focusedComponent = focusable;
+               Application app = getApplication();
+               if(app != null) {
+                       app.setFocusedComponent(focusable);
+                       this.focusedComponent = focusable;
+               }
        }
 
        /* Focusable id generator ****************************************** */