diff options
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ComponentLocator.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java index 0c11064707..6644a243d0 100644 --- a/src/com/vaadin/terminal/gwt/client/ComponentLocator.java +++ b/src/com/vaadin/terminal/gwt/client/ComponentLocator.java @@ -136,14 +136,15 @@ public class ComponentLocator { */ String elementLocator = ((SubPartAware) w) .getSubPartName(targetElement); - return path + SUBPART_SEPARATOR + elementLocator; - } else { - /* - * If everything else fails we use the DOM path to identify the - * target element - */ - return path + getDOMPathForElement(targetElement, w.getElement()); + if (elementLocator != null) { + return path + SUBPART_SEPARATOR + elementLocator; + } } + /* + * If everything else fails we use the DOM path to identify the target + * element + */ + return path + getDOMPathForElement(targetElement, w.getElement()); } /** |