|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
public class TagSupport
A base class for defining new tag handlers implementing Tag.
The TagSupport class is a utility class intended to be used as the base class for new tag handlers. The TagSupport class implements the Tag and IterationTag interfaces and adds additional convenience methods including getter methods for the properties in Tag. TagSupport has one static method that is included to facilitate coordination among cooperating tags.
Many tag handlers will extend TagSupport and only redefine a few methods.
| 字段摘要 | |
|---|---|
protected String |
id
The value of the id attribute of this tag; or null. |
protected PageContext |
pageContext
The PageContext. |
| 从接口 javax.servlet.jsp.tagext.IterationTag 继承的字段 |
|---|
EVAL_BODY_AGAIN |
| 从接口 javax.servlet.jsp.tagext.Tag 继承的字段 |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| 构造方法摘要 | |
|---|---|
TagSupport()
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor. |
|
| 方法摘要 | |
|---|---|
int |
doAfterBody()
Default processing for a body. |
int |
doEndTag()
Default processing of the end tag returning EVAL_PAGE. |
int |
doStartTag()
Default processing of the start tag, returning SKIP_BODY. |
static Tag |
findAncestorWithClass(Tag from,
Class klass)
Find the instance of a given class type that is closest to a given instance. |
String |
getId()
The value of the id attribute of this tag; or null. |
Tag |
getParent()
The Tag instance most closely enclosing this tag instance. |
Object |
getValue(String k)
Get a the value associated with a key. |
Enumeration<String> |
getValues()
Enumerate the keys for the values kept by this tag handler. |
void |
release()
Release state. |
void |
removeValue(String k)
Remove a value associated with a key. |
void |
setId(String id)
Set the id attribute for this tag. |
void |
setPageContext(PageContext pageContext)
Set the page context. |
void |
setParent(Tag t)
Set the nesting tag of this tag. |
void |
setValue(String k,
Object o)
Associate a value with a String key. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected String id
protected PageContext pageContext
| 构造方法详细信息 |
|---|
public TagSupport()
| 方法详细信息 |
|---|
public static final Tag findAncestorWithClass(Tag from,
Class klass)
The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.
When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type.
from - The instance from where to start looking.klass - The subclass of Tag or interface to be matched
public int doStartTag()
throws JspException
Tag 中的 doStartTagJspException - if an error occurs while processing this tagTag.doStartTag()
public int doEndTag()
throws JspException
Tag 中的 doEndTagJspException - if an error occurs while processing this tagTag.doEndTag()
public int doAfterBody()
throws JspException
IterationTag 中的 doAfterBodyJspException - if an error occurs while processing this tagIterationTag.doAfterBody()public void release()
Tag 中的 releaseTag.release()public void setParent(Tag t)
Tag 中的 setParentt - The parent Tag.Tag.setParent(Tag)public Tag getParent()
Tag 中的 getParentTag.getParent()public void setId(String id)
id - The String for the id.public String getId()
public void setPageContext(PageContext pageContext)
Tag 中的 setPageContextpageContext - The PageContext.Tag.setPageContext(javax.servlet.jsp.PageContext)
public void setValue(String k,
Object o)
k - The key String.o - The value to associate.public Object getValue(String k)
k - The string key.
public void removeValue(String k)
k - The string key.public Enumeration<String> getValues()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||