]> source.dussan.org Git - vaadin-framework.git/commitdiff
Thinking I finally got it (ComponentLocator fix)
authorJohn Ahlroos <john@vaadin.com>
Tue, 4 Sep 2012 13:40:12 +0000 (16:40 +0300)
committerJohn Ahlroos <john@vaadin.com>
Tue, 4 Sep 2012 13:40:12 +0000 (16:40 +0300)
client/src/com/vaadin/client/ComponentLocator.java

index 694c57ed5c9c6b7faf001b30f310986b9f0924da..4b47a96dca7810a32b6086807fa3d6a0da1c5dce 100644 (file)
@@ -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--;
+                        }
                     }
                 }