summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-03-20 17:10:32 +0200
committerIlia Motornyi <elmot@vaadin.com>2017-03-20 17:10:32 +0200
commit1d127a0c7f16324ef30806c41dc7c5261105eb38 (patch)
tree17588742560ebe79e64f079c2bcd9fbf2dfe7546 /client
parent2618b8e2cc592a773396a16fd7dccc8b1a0fcd9d (diff)
downloadvaadin-framework-1d127a0c7f16324ef30806c41dc7c5261105eb38.tar.gz
vaadin-framework-1d127a0c7f16324ef30806c41dc7c5261105eb38.zip
Support data-location attribute in CustomLayout (#8866)
Fixes #8416
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VCustomLayout.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java b/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
index 374c241409..d92a17f4b8 100644
--- a/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
+++ b/client/src/main/java/com/vaadin/client/ui/VCustomLayout.java
@@ -212,6 +212,10 @@ public class VCustomLayout extends ComplexPanel {
final String location = elem.getAttribute("location");
locationToElement.put(location, elem);
elem.setInnerHTML("");
+ } else if (elem.hasAttribute("data-location")) {
+ final String location = elem.getAttribute("data-location");
+ locationToElement.put(location, elem);
+ elem.setInnerHTML("");
} else {
final int len = DOM.getChildCount(elem);
for (int i = 0; i < len; i++) {