|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--javax.servlet.jsp.tagext.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 java.lang.String |
id
|
protected PageContext |
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,
java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance. |
java.lang.String |
getId()
The value of the id attribute of this tag; or null. |
Tag |
getParent()
The Tag instance most closely enclosing this tag instance. |
java.lang.Object |
getValue(java.lang.String k)
Get a the value associated with a key. |
java.util.Enumeration |
getValues()
Enumerate the values kept by this tag handler. |
void |
release()
Release state. |
void |
removeValue(java.lang.String k)
Remove a value associated with a key. |
void |
setId(java.lang.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(java.lang.String k,
java.lang.Object o)
Associate a value with a String key. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
protected java.lang.String id
protected PageContext pageContext
コンストラクタの詳細 |
public TagSupport()
メソッドの詳細 |
public static final Tag findAncestorWithClass(Tag from, java.lang.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 matchedpublic int doStartTag() throws JspException
Tag
内の doStartTag
JspException
Tag.doStartTag()
public int doEndTag() throws JspException
Tag
内の doEndTag
JspException
Tag.doEndTag()
public int doAfterBody() throws JspException
IterationTag
内の doAfterBody
JspException
IterationTag.doAfterBody()
public void release()
Tag
内の release
Tag.release()
public void setParent(Tag t)
Tag
内の setParent
t
- The parent Tag.Tag.setParent(Tag)
public Tag getParent()
Tag
内の getParent
Tag.getParent()
public void setId(java.lang.String id)
id
- The String for the id.public java.lang.String getId()
public void setPageContext(PageContext pageContext)
Tag
内の setPageContext
pageContext
- The page context for this tag handler.Tag.setPageContext(javax.servlet.jsp.PageContext)
public void setValue(java.lang.String k, java.lang.Object o)
k
- The key String.o
- The value to associate.public java.lang.Object getValue(java.lang.String k)
k
- The string key.public void removeValue(java.lang.String k)
k
- The string key.public java.util.Enumeration getValues()
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |