]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #5638 - ComponentLocator does not use DOM hierarchy when a SubPartAware fails...
authorArtur Signell <artur.signell@itmill.com>
Mon, 20 Sep 2010 13:38:22 +0000 (13:38 +0000)
committerArtur Signell <artur.signell@itmill.com>
Mon, 20 Sep 2010 13:38:22 +0000 (13:38 +0000)
svn changeset:15073/svn branch:6.4

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

index 0c11064707a55162c6b347e8486d2d29a9334ee8..6644a243d05a32b1566147a40ecb09a95f442a35 100644 (file)
@@ -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());
     }
 
     /**