From c3e30135296b46dacc5d5e6a7d30cd65b37d0d5a Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 20 Feb 2012 15:37:06 +0200 Subject: [PATCH] Fix GridLayout empty cells when UIDL set after component creation. --- src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java | 7 +++++-- .../terminal/gwt/client/ui/VGridLayoutPaintable.java | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java index f894b49d87..6e84d636fc 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VGridLayout.java @@ -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) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/VGridLayoutPaintable.java b/src/com/vaadin/terminal/gwt/client/ui/VGridLayoutPaintable.java index 0df932a45b..24d33fc155 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VGridLayoutPaintable.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VGridLayoutPaintable.java @@ -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; -- 2.39.5