From 3757ed30c6ebbeb7635449c6019ab00a6a25ea5e Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Tue, 4 Sep 2012 16:40:12 +0300 Subject: [PATCH] Thinking I finally got it (ComponentLocator fix) --- .../com/vaadin/client/ComponentLocator.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 694c57ed5c..4b47a96dca 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -589,13 +589,7 @@ public class ComponentLocator { Widget child = iterator.next(); String simpleName2 = Util.getSimpleName(child); - - if ("VBoxLayout$Slot".equals(simpleName2)) { - // Replace slot with the actual widget in the slot - child = ((SimplePanel) child).getWidget(); - simpleName2 = Util.getSimpleName(child); - } - + if (widgetClassName.equals(simpleName2)) { if (widgetPosition == 0) { w = child; @@ -603,6 +597,19 @@ public class ComponentLocator { break; } widgetPosition--; + + } else if (w instanceof VBoxLayout + && "VBoxLayout$Slot".equals(simpleName2)) { + child = ((SimplePanel) child).getWidget(); + simpleName2 = Util.getSimpleName(child); + if (widgetClassName.equals(simpleName2)) { + if (widgetPosition == 0) { + w = child; + ok = true; + break; + } + widgetPosition--; + } } } -- 2.39.5