diff options
author | maxschuster <dev@maxschuster.eu> | 2015-10-11 20:48:52 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-01-04 08:57:05 +0000 |
commit | bc6a82ea2b31a3b2d0e4c79eec3032878598bf0b (patch) | |
tree | 4fc42fdea3ef197d069e13429988da8b8b05be61 /server/src/com | |
parent | ee9f5a6e09c87c7450fddd61cb8e3ddc03b61689 (diff) | |
download | vaadin-framework-bc6a82ea2b31a3b2d0e4c79eec3032878598bf0b.tar.gz vaadin-framework-bc6a82ea2b31a3b2d0e4c79eec3032878598bf0b.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: I7f257fcf89cb78d14d9632aa1be548e92f3010c3
Diffstat (limited to 'server/src/com')
-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; } } |