Package com.jalios.jcms.taglib
Class UrlTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- com.jalios.jcms.taglib.UrlTag
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.jsp.tagext.BodyTag,javax.servlet.jsp.tagext.IterationTag,javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.tagext.Tag
- Direct Known Subclasses:
LinkTag
public class UrlTag extends javax.servlet.jsp.tagext.BodyTagSupportOutput an url using the given parameters. This tag is not a BodyTag but extends BodyTagSupport to allow theLinkTagto benefit from all the computation provided by the UrlTag.- Since:
- jcms-5.7
- Author:
- Olivier Jaquemet
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBASE_URLUse this request attribute to force a specific base URL to be used in the UrlTag, if this value is specified, it will supercede any other value.
-
Constructor Summary
Constructors Constructor Description UrlTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdoAfterBody()intdoEndTag()intdoStartTag()protected java.lang.StringgetBaseURL(javax.servlet.http.HttpServletRequest request)voidprintUrl(javax.servlet.http.HttpServletRequest request, java.io.Writer out, java.util.Locale locale)Prints URL using parameter of this tag.voidsetAnchor(java.lang.String anchor)voidsetBaseUrl(java.lang.String baseURL)voidsetData(Data data)voidsetId(java.lang.String id)voidsetParamNames(java.lang.String[] names)voidsetParamRemove(java.lang.String[] remove)voidsetParams(java.lang.String params)voidsetParamValues(java.lang.String[] values)voidsetUpdate(boolean update)-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
-
-
-
-
Field Detail
-
BASE_URL
public static final java.lang.String BASE_URL
Use this request attribute to force a specific base URL to be used in the UrlTag, if this value is specified, it will supercede any other value.- See Also:
- Constant Field Values
-
-
Method Detail
-
setData
public void setData(Data data)
-
setId
public void setId(java.lang.String id)
- Overrides:
setIdin classjavax.servlet.jsp.tagext.TagSupport
-
setBaseUrl
public void setBaseUrl(java.lang.String baseURL)
-
setUpdate
public void setUpdate(boolean update)
-
setParamNames
public void setParamNames(java.lang.String[] names)
-
setParamValues
public void setParamValues(java.lang.String[] values)
-
setParamRemove
public void setParamRemove(java.lang.String[] remove)
-
setParams
public void setParams(java.lang.String params)
-
setAnchor
public void setAnchor(java.lang.String anchor)
-
printUrl
public void printUrl(javax.servlet.http.HttpServletRequest request, java.io.Writer out, java.util.Locale locale) throws java.lang.ExceptionPrints URL using parameter of this tag.- Parameters:
request- the current HttpServletRequestout- the current JspWriterlocale- the user Locale- Throws:
java.lang.Exception- Since:
- jcms-5.7.0
-
getBaseURL
protected java.lang.String getBaseURL(javax.servlet.http.HttpServletRequest request)
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Throws:
javax.servlet.jsp.JspException
-
doAfterBody
public int doAfterBody() throws javax.servlet.jsp.JspException- Specified by:
doAfterBodyin interfacejavax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjavax.servlet.jsp.tagext.BodyTagSupport- Throws:
javax.servlet.jsp.JspException
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjavax.servlet.jsp.tagext.BodyTagSupport- Throws:
javax.servlet.jsp.JspException
-
-