]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed ComponentLocator to check for null paths. (fix for broken
authorJohn Ahlroos <john@vaadin.com>
Tue, 11 Sep 2012 09:10:18 +0000 (12:10 +0300)
committerJohn Ahlroos <john@vaadin.com>
Tue, 11 Sep 2012 09:14:57 +0000 (12:14 +0300)
BooleanTextField test)

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

index 68c97badfb62ac270d54168a7554034d4d9d0379..1852b672603bb9459d66ae48026d664139634678 100644 (file)
@@ -197,7 +197,12 @@ public class ComponentLocator {
          * If everything else fails we use the DOM path to identify the target
          * element
          */
-        return path + getDOMPathForElement(targetElement, w.getElement());
+        String domPath = getDOMPathForElement(targetElement, w.getElement());
+        if (domPath == null) {
+            return path;
+        } else {
+            return path + domPath;
+        }
     }
 
     /**
@@ -498,9 +503,9 @@ public class ComponentLocator {
                 // VVerticalLayout and 0
                 String[] split = part.split("\\[", 2);
                 String widgetClassName = split[0];
-                String indexString = split[1];
-                int widgetPosition = Integer.parseInt(indexString.substring(0,
-                        indexString.length() - 1));
+                String indexString = split[1].substring(0,
+                        split[1].length() - 1);
+                int widgetPosition = Integer.parseInt(indexString);
 
                 // AbsolutePanel in GridLayout has been removed -> skip it
                 if (w instanceof VGridLayout