Package org.opencms.jsp
Class CmsJspTagMap
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.opencms.jsp.CmsJspTagMap
-
- 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
,I_CmsJspTagParamParent
public class CmsJspTagMap extends javax.servlet.jsp.tagext.BodyTagSupport implements I_CmsJspTagParamParent
Builds a java.util.Map isntance with string keys and values from nested param tags, then stores it in a page context variable whose name is supplied by the user.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsJspTagMap()
Empty constructor, required for attribute value initialization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(java.lang.String name, java.lang.String value)
Add a parameter to this tag.int
doEndTag()
int
doStartTag()
Returns
.BodyTag.EVAL_BODY_BUFFERED
void
setVar(java.lang.String var)
Sets the variable name in which the map should be stored.-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Constructor Detail
-
CmsJspTagMap
public CmsJspTagMap()
Empty constructor, required for attribute value initialization.
-
-
Method Detail
-
addParameter
public void addParameter(java.lang.String name, java.lang.String value)
Description copied from interface:I_CmsJspTagParamParent
Add a parameter to this tag. The intent is that the <param> subtag will call this to register parameters. Assumes that 'name' and 'value' are appropriately encoded and do not contain any meaningful metacharacters; in order words, escaping is the responsibility of the caller.- Specified by:
addParameter
in interfaceI_CmsJspTagParamParent
- Parameters:
name
- the name of the parametervalue
- the value of the parameter- See Also:
I_CmsJspTagParamParent.addParameter(java.lang.String, java.lang.String)
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
EVAL_PAGE
- Throws:
javax.servlet.jsp.JspException
- by interface default- See Also:
Tag.doEndTag()
-
doStartTag
public int doStartTag()
Returns
.BodyTag.EVAL_BODY_BUFFERED
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Returns:
BodyTag.EVAL_BODY_BUFFERED
- See Also:
Tag.doStartTag()
-
setVar
public void setVar(java.lang.String var)
Sets the variable name in which the map should be stored.- Parameters:
var
- the name of the variable
-
-