]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed interpreting caption domNode paths in VBoxLayout in
authorJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 10:54:52 +0000 (13:54 +0300)
committerJohn Ahlroos <john@vaadin.com>
Wed, 5 Sep 2012 10:54:52 +0000 (13:54 +0300)
ComponentLocator

client/src/com/vaadin/client/ComponentLocator.java

index f57946eea8a7e92b8ec30ccab39309b9803e4e3c..42b54ca49cf89c902c4ef540a2907d3b28e26cde 100644 (file)
@@ -271,9 +271,14 @@ public class ComponentLocator {
                         part.length() - 1);
 
                 if (Util.findWidget(baseElement, null) instanceof VBoxLayout) {
-                    Element e = baseElement.getFirstChildElement().cast();
-                    if (e.getClassName().equals("v-expand")) {
-                        element = e;
+                    if (element.hasChildNodes()) {
+                        Element e = element.getFirstChildElement().cast();
+                        String cn = e.getClassName();
+                        if (cn != null
+                                && (cn.equals("v-expand") || cn
+                                        .contains("v-has-caption"))) {
+                            element = e;
+                        }
                     }
                 }