public class TagSupport extends java.lang.Object implements IterationTag, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
id
The value of the "id" attribute for the tag, if specified.
|
protected PageContext |
pageContext
The owning PageContext.
|
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
TagSupport()
Tags need to implement a zero-arg constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
doAfterBody()
Processed to check if the tag should loop.
|
int |
doEndTag()
Processed at the end of the tag.
|
int |
doStartTag()
Processed at the beginning of the tag.
|
static Tag |
findAncestorWithClass(Tag tag,
java.lang.Class cl)
Finds an ancestor of a tag matching the class.
|
java.lang.String |
getId()
Sets the id attribute.
|
Tag |
getParent()
Returns the tag's parent.
|
java.lang.Object |
getValue(java.lang.String name)
Returns an attribute from the tag.
|
java.util.Enumeration<java.lang.String> |
getValues()
Enumerates the tag's attributes.
|
void |
release()
Cleans the tag after it completes.
|
void |
removeValue(java.lang.String name)
Removes a value from the tag.
|
void |
setId(java.lang.String id)
Sets the id attribute.
|
void |
setPageContext(PageContext page)
Stores the page context for the JSP page.
|
void |
setParent(Tag parent)
If the tag is contained in another tag, this sets the parent.
|
void |
setValue(java.lang.String name,
java.lang.Object value)
Sets the value for a tag attribute.
|
protected java.lang.String id
protected PageContext pageContext
public int doStartTag() throws JspException
The default behavior returns SKIP_BODY to skip the tag's body.
doStartTag
in interface Tag
JspException
public int doAfterBody() throws JspException
doAfterBody
in interface IterationTag
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
JspException
public void setId(java.lang.String id)
public java.lang.String getId()
public void setPageContext(PageContext page)
setPageContext
in interface Tag
public void setParent(Tag parent)
public static final Tag findAncestorWithClass(Tag tag, java.lang.Class cl)
tag
- child tag to start searching.cl
- the class that the tag should implement.public java.lang.Object getValue(java.lang.String name)
public java.util.Enumeration<java.lang.String> getValues()
public void removeValue(java.lang.String name)
public void setValue(java.lang.String name, java.lang.Object value)
name
- the name of the attribute.value
- the new value for the attribute.