diff options
author | Mika Murtojarvi <mika@vaadin.com> | 2015-04-08 11:05:23 +0300 |
---|---|---|
committer | Mika Murtojarvi <mika@vaadin.com> | 2015-04-08 11:36:37 +0300 |
commit | 6abcbdf1eeb8f23ebda97df3ffad7b0abdee37ea (patch) | |
tree | beeffc67cd93cb7bbfa12cb5211270004861b87b /server/src/com/vaadin | |
parent | 8664c97c7bb6fb36b2ebbe3849b51ec00e052e24 (diff) | |
download | vaadin-framework-6abcbdf1eeb8f23ebda97df3ffad7b0abdee37ea.tar.gz vaadin-framework-6abcbdf1eeb8f23ebda97df3ffad7b0abdee37ea.zip |
Allow setting local id via DesignContext (#16584).
Change-Id: Ie599e8517823ca431d2d9e9232217db53444d7aa
Diffstat (limited to 'server/src/com/vaadin')
-rw-r--r-- | server/src/com/vaadin/ui/declarative/DesignContext.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/com/vaadin/ui/declarative/DesignContext.java b/server/src/com/vaadin/ui/declarative/DesignContext.java index 54be5dcea3..fe3abcfb77 100644 --- a/server/src/com/vaadin/ui/declarative/DesignContext.java +++ b/server/src/com/vaadin/ui/declarative/DesignContext.java @@ -170,16 +170,16 @@ public class DesignContext implements Serializable { * component, the mapping from c to the string is removed. Similarly, if * component was mapped to some string s different from localId, the mapping * from s to component is removed. - * - * @param localId - * The new local id of the component. * @param component * The component whose local id is to be set. + * @param localId + * The new local id of the component. + * * @return true, if there already was a local id mapping from the string to * some component or from the component to some string. Otherwise * returns false. */ - private boolean mapLocalId(String localId, Component component) { + public boolean setComponentLocalId(Component component, String localId) { return twoWayMap(localId, component, localIdToComponent, componentToLocalId); } @@ -466,7 +466,7 @@ public class DesignContext implements Serializable { // from the attributes of componentDesign if (attributes.hasKey(LOCAL_ID_ATTRIBUTE)) { String localId = attributes.get(LOCAL_ID_ATTRIBUTE); - boolean mappingExists = mapLocalId(localId, component); + boolean mappingExists = setComponentLocalId(component, localId); if (mappingExists) { throw new DesignException( "the following local id is not unique: " + localId); |