]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed ClassCastException for VWindow
authorArtur Signell <artur@vaadin.com>
Thu, 2 Feb 2012 09:30:47 +0000 (11:30 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 2 Feb 2012 09:30:47 +0000 (11:30 +0200)
src/com/vaadin/terminal/gwt/client/ui/VViewPaintable.java

index ccf7185c14e4e05e20e0d7598e6c04599ba649a0..3e8b178b1d828dd00b58547316fe0fbf8046576e 100644 (file)
@@ -167,11 +167,13 @@ public class VViewPaintable extends VAbstractPaintableWidgetContainer {
                 }
             } else {
                 // subwindows
-                final VPaintableWidget w = client.getPaintable(childUidl);
-                if (getWidgetForPaintable().subWindows.contains(w)) {
-                    removedSubWindows.remove(w);
+                final VWindowPaintable w = (VWindowPaintable) client
+                        .getPaintable(childUidl);
+                VWindow windowWidget = w.getWidgetForPaintable();
+                if (getWidgetForPaintable().subWindows.contains(windowWidget)) {
+                    removedSubWindows.remove(windowWidget);
                 } else {
-                    getWidgetForPaintable().subWindows.add((VWindow) w);
+                    getWidgetForPaintable().subWindows.add(windowWidget);
                 }
                 w.updateFromUIDL(childUidl, client);
             }