From f247e5bb9d84326771327d619ce501c7ba2909fd Mon Sep 17 00:00:00 2001 From: Anna Miroshnik Date: Wed, 20 Aug 2014 14:47:39 +0400 Subject: Fix CustomLayout: component not added at the default location (#14340) Change-Id: I5eb76915b52f6b73ff0799631d98d5711041eeb5 --- client/src/com/vaadin/client/ui/VCustomLayout.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/src/com/vaadin/client/ui/VCustomLayout.java b/client/src/com/vaadin/client/ui/VCustomLayout.java index f9caceb668..3b2b007b5b 100644 --- a/client/src/com/vaadin/client/ui/VCustomLayout.java +++ b/client/src/com/vaadin/client/ui/VCustomLayout.java @@ -208,12 +208,10 @@ public class VCustomLayout extends ComplexPanel { /** Collect locations from template */ private void scanForLocations(Element elem) { - - final String location = elem.getAttribute("location"); - if (!"".equals(location)) { + if (elem.hasAttribute("location")) { + final String location = elem.getAttribute("location"); locationToElement.put(location, elem); elem.setInnerHTML(""); - } else { final int len = DOM.getChildCount(elem); for (int i = 0; i < len; i++) { -- cgit v1.2.3