private String height;
+ private Widget layout;
+
public IPanel() {
super();
DOM.appendChild(getElement(), captionNode);
: null;
setWidth(w != null ? w : "");
- // TODO optimize: if only the caption has changed, don't re-render whole
- // content
- if (getWidget() != null) {
- clear();
- }
// Handle caption displaying
boolean hasCaption = false;
if (uidl.hasAttribute("caption")
// Render content
UIDL layoutUidl = uidl.getChildUIDL(0);
- Widget layout = client.getWidget(layoutUidl);
- setWidget(layout);
+ Widget newLayout = client.getWidget(layoutUidl);
+ if(newLayout != layout) {
+ if(layout != null)
+ client.unregisterPaintable((Paintable) layout);
+ setWidget(newLayout);
+ layout = newLayout;
+ }
((Paintable) layout).updateFromUIDL(layoutUidl, client);
}