diff options
author | Matti Hosio <mhosio@vaadin.com> | 2014-12-12 14:08:41 +0200 |
---|---|---|
committer | Matti Hosio <mhosio@vaadin.com> | 2014-12-12 14:08:41 +0200 |
commit | c4aab1fe917b3cae5a41c8acc1e7cbea07700106 (patch) | |
tree | aed7a17efbba11b6d57fa8ef5cd04a2fe0524e5c /server/src/com/vaadin/ui/declarative/DesignContext.java | |
parent | e09ba97f64c19d5efcd2d99b7ebf9b7dfef144d7 (diff) | |
download | vaadin-framework-c4aab1fe917b3cae5a41c8acc1e7cbea07700106.tar.gz vaadin-framework-c4aab1fe917b3cae5a41c8acc1e7cbea07700106.zip |
Some logging improvements and minor fixes for Declarative (#7749)
Change-Id: Iccb1bbf3be1a030d4902165dbf59ecea3e8b134b
Diffstat (limited to 'server/src/com/vaadin/ui/declarative/DesignContext.java')
-rw-r--r-- | server/src/com/vaadin/ui/declarative/DesignContext.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/server/src/com/vaadin/ui/declarative/DesignContext.java b/server/src/com/vaadin/ui/declarative/DesignContext.java index 51bfd7c379..988dc7654e 100644 --- a/server/src/com/vaadin/ui/declarative/DesignContext.java +++ b/server/src/com/vaadin/ui/declarative/DesignContext.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.jsoup.nodes.Attribute; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -440,16 +439,9 @@ public class DesignContext implements Serializable { } // local id: this is not a property of a component, so need to fetch it // from the attributes of componentDesign - String localId = null; - for (Attribute attribute : attributes.asList()) { - if (attribute.getKey().equals(LOCAL_ID_ATTRIBUTE)) { - if (localId != null) { - throw new DesignException("Duplicate local ids specified: " - + localId + "."); - } - localId = attribute.getValue(); - mapLocalId(localId, component); // two-way map - } + if (attributes.hasKey(LOCAL_ID_ATTRIBUTE)) { + String localId = attributes.get(LOCAL_ID_ATTRIBUTE); + mapLocalId(localId, component); // two-way map } // caption: a property of a component, possibly not unique String caption = component.getCaption(); |