diff options
author | John Ahlroos <john@vaadin.com> | 2012-09-11 12:10:18 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-09-11 12:14:57 +0300 |
commit | 8e83c36157bbdcd0a7baa8cce33c9dd151392470 (patch) | |
tree | 3e9a202b9c23c4cd11da1c74d279411c5b742686 /client | |
parent | 3736f01b5918c292416559d72394aea07435e09e (diff) | |
download | vaadin-framework-8e83c36157bbdcd0a7baa8cce33c9dd151392470.tar.gz vaadin-framework-8e83c36157bbdcd0a7baa8cce33c9dd151392470.zip |
Fixed ComponentLocator to check for null paths. (fix for broken
BooleanTextField test)
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ComponentLocator.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java index 68c97badfb..1852b67260 100644 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ b/client/src/com/vaadin/client/ComponentLocator.java @@ -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 |