Package com.composum.sling.cpnl
Class LinkTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- com.composum.sling.cpnl.CpnlBodyTagSupport
-
- com.composum.sling.cpnl.TagBase
-
- com.composum.sling.cpnl.UrlTag
-
- com.composum.sling.cpnl.LinkTag
-
- All Implemented Interfaces:
Serializable,javax.servlet.jsp.tagext.BodyTag,javax.servlet.jsp.tagext.DynamicAttributes,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
public class LinkTag extends UrlTag
a tag to build hypertext links with mapped URLs- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Objectbodyprotected Stringtarget-
Fields inherited from class com.composum.sling.cpnl.TagBase
classes, dynamicAttributes, TAG_NONE, tagName, test
-
Fields inherited from class com.composum.sling.cpnl.CpnlBodyTagSupport
context, out, request, resource, resourceResolver
-
-
Constructor Summary
Constructors Constructor Description LinkTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclear()Reset all member variables to the (default) start values.intdoStartTag()protected booleangetBodyResult()evaluates the 'body' test expression if present and returns the evaluation result; default: 'true'protected StringgetDefaultTagName()protected StringgetDefaultUrlAttr()voidsetBody(Object value)if the 'body' expression is 'true' the body is rendered without a link around even if 'test' is 'false'voidsetHref(String href)voidsetTarget(String target)protected voidwriteAttributes(javax.servlet.jsp.JspWriter writer)-
Methods inherited from class com.composum.sling.cpnl.UrlTag
buildUrl, getFormatter, getUrlAttr, setFormat, setMap, setRole, setUrl, setUrlAttr
-
Methods inherited from class com.composum.sling.cpnl.TagBase
acceptDynamicAttribute, doEndTag, getClasses, getTagName, getTestResult, renderTag, renderTagEnd, renderTagStart, setClasses, setDynamicAttribute, setTagName, setTest
-
Methods inherited from class com.composum.sling.cpnl.CpnlBodyTagSupport
createContext, eval, getExpressionUtil, release, setPageContext
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
-
-
-
Method Detail
-
clear
protected void clear()
Description copied from class:CpnlBodyTagSupportReset all member variables to the (default) start values. Called prior processing the tag and at release time.
-
setTarget
public void setTarget(String target)
-
setBody
public void setBody(Object value)
if the 'body' expression is 'true' the body is rendered without a link around even if 'test' is 'false'
-
getBodyResult
protected boolean getBodyResult()
evaluates the 'body' test expression if present and returns the evaluation result; default: 'true'
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classTagBase- Throws:
javax.servlet.jsp.JspException
-
getDefaultTagName
protected String getDefaultTagName()
- Specified by:
getDefaultTagNamein classTagBase
-
getDefaultUrlAttr
protected String getDefaultUrlAttr()
- Specified by:
getDefaultUrlAttrin classUrlTag
-
setHref
public void setHref(String href)
-
writeAttributes
protected void writeAttributes(javax.servlet.jsp.JspWriter writer) throws IOException- Overrides:
writeAttributesin classUrlTag- Throws:
IOException
-
-