From: Matti Tahvonen Date: Thu, 29 Nov 2007 15:16:38 +0000 (+0000) Subject: fixes #1178 X-Git-Tag: 6.7.0.beta1~5381 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=54c79ea56c2475eeeae3671284aed0ea5041eb9f;p=vaadin-framework.git fixes #1178 svn changeset:3048/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IGridLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IGridLayout.java index d0ae64ed02..2d3328a4a5 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IGridLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IGridLayout.java @@ -23,7 +23,6 @@ public class IGridLayout extends FlexTable implements Paintable, Container { return; } - clear(); if (uidl.hasAttribute("caption")) { setTitle(uidl.getStringAttribute("caption")); } @@ -52,10 +51,16 @@ public class IGridLayout extends FlexTable implements Paintable, Container { Widget child = client.getWidget(u); prepareCell(row, column); Widget oldChild = getWidget(row, column); + if (oldChild instanceof CaptionWrapper) { + CaptionWrapper new_name = (CaptionWrapper) oldChild; + oldChild = (Widget) new_name.getPaintable(); + } if (child != oldChild) { if (oldChild != null) { - CaptionWrapper cw = (CaptionWrapper) oldChild; - detachdedPaintables.add(cw.getPaintable()); + detachdedPaintables.add(oldChild); + CaptionWrapper cw = (CaptionWrapper) widgetToCaptionWrapper + .get(oldChild); + cw.removeFromParent(); widgetToCaptionWrapper.remove(oldChild); } CaptionWrapper wrapper = new CaptionWrapper( @@ -63,7 +68,9 @@ public class IGridLayout extends FlexTable implements Paintable, Container { setWidget(row, column, wrapper); widgetToCaptionWrapper.put(child, wrapper); } - ((Paintable) child).updateFromUIDL(u, client); + if (!u.getBooleanAttribute("cached")) { + ((Paintable) child).updateFromUIDL(u, client); + } } column += w; }