From: Artur Signell Date: Mon, 12 Mar 2012 10:13:16 +0000 (+0200) Subject: Temporary fix to make AbstractOrderedLayout work again X-Git-Tag: 7.0.0.alpha2~350 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b47a7d5cdeb51cd7c536d2cfe4ce17b06954d51c;p=vaadin-framework.git Temporary fix to make AbstractOrderedLayout work again --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java index aec7f5cd3c..c49b55eef7 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractOrderedLayoutConnector.java @@ -3,8 +3,8 @@ */ package com.vaadin.terminal.gwt.client.ui; -import java.util.HashSet; import java.util.Iterator; +import java.util.List; import com.google.gwt.dom.client.Node; import com.google.gwt.dom.client.Style; @@ -24,6 +24,8 @@ import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; public abstract class AbstractOrderedLayoutConnector extends AbstractComponentContainerConnector implements DirectionalManagedLayout { + private List previousChildren; + @Override public void init() { getLayoutManager().registerDependency(this, @@ -62,9 +64,6 @@ public abstract class AbstractOrderedLayoutConnector extends return; } - HashSet previousChildren = new HashSet( - getChildren()); - VMeasuringOrderedLayout layout = getWidget(); ValueMap expandRatios = uidl.getMapAttribute("expandRatios"); @@ -72,6 +71,7 @@ public abstract class AbstractOrderedLayoutConnector extends int currentIndex = 0; // TODO Support reordering elements! + // FIXME: move to connectorHierarchyChanged!! for (final Iterator it = uidl.getChildIterator(); it.hasNext();) { final UIDL childUIDL = (UIDL) it.next(); final ComponentConnector child = client.getPaintable(childUIDL); @@ -281,4 +281,10 @@ public abstract class AbstractOrderedLayoutConnector extends } } + @Override + public void connectorHierarchyChanged( + com.vaadin.terminal.gwt.client.ConnectorHierarchyChangedEvent event) { + previousChildren = event.getOldChildren(); + }; + }