]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix GridLayout empty cells when UIDL set after component creation.
authorHenri Sara <hesara@vaadin.com>
Mon, 20 Feb 2012 13:37:06 +0000 (15:37 +0200)
committerHenri Sara <hesara@vaadin.com>
Mon, 20 Feb 2012 13:37:06 +0000 (15:37 +0200)
src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java
src/com/vaadin/terminal/gwt/client/ui/VGridLayoutPaintable.java

index f894b49d87704672f0f8b80f49ca29bd21deea80..6e84d636fce2568d5a47d99f30c805bfd62f76d9 100644 (file)
@@ -929,8 +929,11 @@ public class VGridLayout extends SimplePanel implements Container {
                 }
             }
             childUidl = c;
-            updateRelSizeStatus(client.getPaintable(c).getState(),
-                    c.getBooleanAttribute("cached"));
+            if (null != c) {
+                VPaintableWidget paintable = client.getPaintable(c);
+                updateRelSizeStatus(paintable.getState(),
+                        c.getBooleanAttribute("cached"));
+            }
         }
 
         protected void updateRelSizeStatus(SharedState state, boolean cached) {
index 0df932a45b8c0ecb48a0c8448756040f510c3eda..24d33fc1559cc7f633a58a2c7926fe1daf3bb348 100644 (file)
@@ -38,7 +38,6 @@ public class VGridLayoutPaintable extends VAbstractPaintableWidgetContainer {
     };
 
     @Override
-    @SuppressWarnings("unchecked")
     public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
         getWidgetForPaintable().rendering = true;
         getWidgetForPaintable().client = client;