Package nl.gx.webmanager.taglib.edit
Class EscapeToHtmlTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- nl.gx.webmanager.taglib.edit.EscapeToHtmlTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
public class EscapeToHtmlTag extends javax.servlet.jsp.tagext.SimpleTagSupport
Implements thewmedit:escapeToHtml
tag. This tag umlifies the given string value. If thevar
attribute is set, the result is bound to the var in the pagecontext, else the result of the lookup is printed. This functionality should be used when a string is rendered within an attribute value of an html (or xml) tag.- Author:
- arjans
-
-
Constructor Summary
Constructors Constructor Description EscapeToHtmlTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
protected String
getValue()
Return the escaped value.protected String
getVar()
Return name of the variable to which the escaped value will be assigned or null.void
setValue(String value)
Setter for the required value attribute.void
setVar(String var)
Setter for the optional var attribute.
-
-
-
Method Detail
-
setVar
public void setVar(String var)
Setter for the optional var attribute.- Parameters:
var
- name of the variable to which the escaped value will be assigned.
-
getVar
protected String getVar()
Return name of the variable to which the escaped value will be assigned or null.- Returns:
- name of the variable to which the escaped value will be assigned or null if not set.
-
setValue
public void setValue(String value)
Setter for the required value attribute.- Parameters:
value
- value that is to be escaped.
-
getValue
protected String getValue()
Return the escaped value.- Returns:
- the escaped value.
-
doTag
public void doTag() throws javax.servlet.jsp.JspException
- Specified by:
doTag
in interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
-
-