From: Leif Åstrand Date: Wed, 22 Feb 2012 09:38:55 +0000 (+0200) Subject: Update ComponentLocator for changed GridLayout widget structure (#8313) X-Git-Tag: 7.0.0.alpha2~434^2~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ec8679dcb8d79b6774997d4382ca53759a802e46;p=vaadin-framework.git Update ComponentLocator for changed GridLayout widget structure (#8313) --- diff --git a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java index 51e600abaf..3b4821cc0f 100644 --- a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java +++ b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java @@ -12,6 +12,7 @@ import com.google.gwt.user.client.ui.HasWidgets; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ui.SubPartAware; +import com.vaadin.terminal.gwt.client.ui.VGridLayout; import com.vaadin.terminal.gwt.client.ui.VMeasuringOrderedLayout; import com.vaadin.terminal.gwt.client.ui.VView; import com.vaadin.terminal.gwt.client.ui.VWindow; @@ -458,19 +459,25 @@ public class ComponentLocator { int widgetPosition = Integer.parseInt(indexString.substring(0, indexString.length() - 1)); + // AbsolutePanel in GridLayout has been removed -> skip it + if (w instanceof VGridLayout + && "AbsolutePanel".equals(widgetClassName)) { + continue; + } + /* - * The new ordered layotus do not contain + * The new grid and ordered layotus do not contain * ChildComponentContainer widgets. This is instead simulated by * constructing a path step that would find the desired widget * from the layout and injecting it as the next search step * (which would originally have found the widget inside the * ChildComponentContainer) */ - if (w instanceof VMeasuringOrderedLayout + if ((w instanceof VMeasuringOrderedLayout || w instanceof VGridLayout) && "ChildComponentContainer".equals(widgetClassName) && i + 1 < parts.length) { - VMeasuringOrderedLayout layout = (VMeasuringOrderedLayout) w; + HasWidgets layout = (HasWidgets) w; String nextPart = parts[i + 1]; String[] nextSplit = nextPart.split("\\[", 2);