Package com.composum.sling.cpnl
Class UrlTag
- 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
-
- 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 abstract class UrlTag extends TagBase
an abstract base tag implementation to generate URL based elements- See Also:
- Serialized Form
-
-
Field Summary
-
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 UrlTag()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected @NotNull StringbuildUrl(@NotNull String urlValue, @Nullable Boolean map)protected voidclear()Reset all member variables to the (default) start values.protected abstract StringgetDefaultUrlAttr()FormatgetFormatter(Object value)protected StringgetUrlAttr()voidsetFormat(String format)voidsetMap(Boolean mapIt)voidsetRole(String role)voidsetUrl(String url)voidsetUrlAttr(String urlAttr)protected voidwriteAttributes(javax.servlet.jsp.JspWriter writer)-
Methods inherited from class com.composum.sling.cpnl.TagBase
acceptDynamicAttribute, doEndTag, doStartTag, getClasses, getDefaultTagName, 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.
-
getDefaultUrlAttr
protected abstract String getDefaultUrlAttr()
-
setUrl
public void setUrl(String url)
-
setUrlAttr
public void setUrlAttr(String urlAttr)
-
getUrlAttr
protected String getUrlAttr()
-
setMap
public void setMap(Boolean mapIt)
-
setRole
public void setRole(String role)
-
setFormat
public void setFormat(String format)
- Parameters:
format- The format to set to build a url from the 'url' value: {} or {0} is replaced by the url.
-
buildUrl
@NotNull protected @NotNull String buildUrl(@NotNull @NotNull String urlValue, @Nullable @Nullable Boolean map)
-
writeAttributes
protected void writeAttributes(javax.servlet.jsp.JspWriter writer) throws IOException- Overrides:
writeAttributesin classTagBase- Throws:
IOException
-
-