diff options
author | maxschuster <dev@maxschuster.eu> | 2015-10-11 20:48:52 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-01-05 14:06:38 +0200 |
commit | 691fcd02c0dab910caaccff1af57da6613be9009 (patch) | |
tree | 9a53910b64c4551661557c1b2934525fbe8a40b3 /server/src | |
parent | 7d6349737dba9b96c8abc184b7c2f8b9530cd008 (diff) | |
download | vaadin-framework-691fcd02c0dab910caaccff1af57da6613be9009.tar.gz vaadin-framework-691fcd02c0dab910caaccff1af57da6613be9009.zip |
Fix custom attributes of Link component (#19107)
Added the custom attributes href and target to the Link component to
match the attribute names used by Link.readDesign() and
Link.writeDesign()
Change-Id: I9417034572c66e54034b816a15d7a1ec29030fbf
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/Link.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/server/src/com/vaadin/ui/Link.java b/server/src/com/vaadin/ui/Link.java index b6e127fd38..c100336180 100644 --- a/server/src/com/vaadin/ui/Link.java +++ b/server/src/com/vaadin/ui/Link.java @@ -90,8 +90,8 @@ public class Link extends AbstractComponent { * the Border style of the target window. * */ - public Link(String caption, Resource resource, String targetName, - int width, int height, BorderStyle border) { + public Link(String caption, Resource resource, String targetName, int width, + int height, BorderStyle border) { setCaption(caption); setResource(resource); setTargetName(targetName); @@ -212,12 +212,12 @@ public class Link extends AbstractComponent { public void readDesign(Element design, DesignContext designContext) { super.readDesign(design, designContext); if (design.hasAttr("target")) { - setTargetName(DesignAttributeHandler.getFormatter().parse( - design.attr("target"), String.class)); + setTargetName(DesignAttributeHandler.getFormatter() + .parse(design.attr("target"), String.class)); } if (design.hasAttr("href")) { - setResource(DesignAttributeHandler.getFormatter().parse( - design.attr("href"), Resource.class)); + setResource(DesignAttributeHandler.getFormatter() + .parse(design.attr("href"), Resource.class)); } } @@ -236,6 +236,9 @@ public class Link extends AbstractComponent { Collection<String> a = super.getCustomAttributes(); a.add("target-name"); a.add("resource"); + // Add custom attributes, see #19107 + a.add("target"); + a.add("href"); return a; } } |