From e26aebd3ab9e7c2c41947e705b561adc1488cb56 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 30 Aug 2007 10:04:27 +0000 Subject: [PATCH] subwindows now send attach events & works with focus correctly svn changeset:2154/svn branch:trunk --- src/com/itmill/toolkit/ui/Window.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/itmill/toolkit/ui/Window.java b/src/com/itmill/toolkit/ui/Window.java index 48115ffb0d..3ac97df352 100644 --- a/src/com/itmill/toolkit/ui/Window.java +++ b/src/com/itmill/toolkit/ui/Window.java @@ -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 ****************************************** */ -- 2.39.5