From b92a93f86a990a30a19cc7cae1b87fd35e262352 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Wed, 5 Sep 2012 10:30:17 +0300 Subject: [PATCH] Another fix to ComponentLocator, this time fixed locators with VBoxLayout/domChild --- client/src/com/vaadin/client/ComponentLocator.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 017383e695..6cdccc0ff0 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -269,6 +269,14 @@ public class ComponentLocator { if (part.startsWith("domChild[")) { String childIndexString = part.substring("domChild[".length(), part.length() - 1); + + if (Util.findWidget(baseElement, null) instanceof VBoxLayout) { + Element e = baseElement.getFirstChildElement().cast(); + if (e.getClassName().equals("v-expand")) { + element = e; + } + } + try { int childIndex = Integer.parseInt(childIndexString); element = DOM.getChild(element, childIndex); -- 2.39.5