Permalink
Browse files

Add rel and target attributes to link tag

  • Loading branch information...
shred committed Oct 6, 2018
1 parent 4222e30 commit 81644223aa65d8cb8955bd525eb6a4c9a7fedaf1
@@ -73,6 +73,8 @@
private String styleClass;
private String style;
private String title;
private String rel;
private String target;
private String view;
private String qualifier;
@@ -111,6 +113,12 @@
@TagParameter
public void setTitle(String title) { this.title = title; }
@TagParameter
public void setRel(String rel) { this.rel = rel; }
@TagParameter
public void setTarget(String target) { this.target = target; }
@TagParameter
public void setView(String view) { this.view = view; }
@@ -214,6 +222,14 @@ public int doEndTag() throws JspException {
linktag.append(" id=\"").append(HtmlUtils.htmlEscape(id)).append('"');
}
if (target != null) {
linktag.append(" target=\"").append(HtmlUtils.htmlEscape(target)).append('"');
}
if (rel != null) {
linktag.append(" rel=\"").append(HtmlUtils.htmlEscape(rel)).append('"');
}
if (onclick != null) {
linktag.append(" onclick=\"").append(HtmlUtils.htmlEscape(onclick)).append('"');
}
@@ -25,6 +25,8 @@ These parameters are optional:
* `anchor`: An anchor to append to the generated URL
* `id`: `id` attribute of the generated `<a>` tag
* `target`: `target` attribute of the generated `<a>` tag
* `rel`: `rel` attribute of the generated `<a>` tag
* `title`: `title` attribute of the generated `<a>` tag
* `styleClass`: `class` attribute of the generated `<a>` tag
* `style`: `style` attribute of the generated `<a>` tag

0 comments on commit 8164422

Please sign in to comment.