|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
public class TagSupport
Convenient support class for creating tags which don't analyze their bodies. Normally, tags will extend TagSupport instead of implementing Tag directly.
| Field Summary | |
|---|---|
protected java.lang.String |
id
The value of the "id" attribute for the tag, if specified. |
protected PageContext |
pageContext
The owning PageContext. |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
TagSupport()
Tags need to implement a zero-arg constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String id
protected PageContext pageContext
| Constructor Detail |
|---|
public TagSupport()
| Method Detail |
|---|
public int doStartTag()
throws JspException
The default behavior returns SKIP_BODY to skip the tag's body.
doStartTag in interface TagJspException
public int doAfterBody()
throws JspException
doAfterBody in interface IterationTagJspException
public int doEndTag()
throws JspException
doEndTag in interface TagJspExceptionpublic void setId(java.lang.String id)
public java.lang.String getId()
public void setPageContext(PageContext page)
setPageContext in interface Tagpublic void setParent(Tag parent)
setParent in interface Tagparent - the tag to be used as a parent.public Tag getParent()
getParent in interface Tag
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.public void release()
release in interface Tag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||