Ja-Jakarta
Translation

javax.servlet.jsp.tagext
クラス TagSupport

java.lang.Object
  上位を拡張 javax.servlet.jsp.tagext.TagSupport
すべての実装されたインタフェース:
java.io.Serializable, IterationTag, JspTag, Tag
直系の既知のサブクラス:
BodyTagSupport

public class TagSupport
extends java.lang.Object
implements IterationTag, java.io.Serializable

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
          The value of the id attribute of this tag; or null.
protected  javax.servlet.jsp.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, 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 keys for 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(javax.servlet.jsp.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
 

フィールドの詳細

id

protected java.lang.String id
The value of the id attribute of this tag; or null.


pageContext

protected javax.servlet.jsp.PageContext pageContext
The PageContext.

コンストラクタの詳細

TagSupport

public TagSupport()
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.

メソッドの詳細

findAncestorWithClass

public static final Tag findAncestorWithClass(Tag from,
                                              java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance. This method uses the getParent method from the Tag interface. This method is used for coordination among cooperating tags.

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
戻り値:
the nearest ancestor that implements the interface or is an instance of the class specified

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Default processing of the start tag, returning SKIP_BODY.

定義:
インタフェース Tag 内の doStartTag
戻り値:
SKIP_BODY
例外:
javax.servlet.jsp.JspException - if an error occurs while processing this tag
関連項目:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Default processing of the end tag returning EVAL_PAGE.

定義:
インタフェース Tag 内の doEndTag
戻り値:
EVAL_PAGE
例外:
javax.servlet.jsp.JspException - if an error occurs while processing this tag
関連項目:
Tag.doEndTag()

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Default processing for a body.

定義:
インタフェース IterationTag 内の doAfterBody
戻り値:
SKIP_BODY
例外:
javax.servlet.jsp.JspException - if an error occurs while processing this tag
関連項目:
IterationTag.doAfterBody()

release

public void release()
Release state.

定義:
インタフェース Tag 内の release
関連項目:
Tag.release()

setParent

public void setParent(Tag t)
Set the nesting tag of this tag.

定義:
インタフェース Tag 内の setParent
パラメータ:
t - The parent Tag.
関連項目:
Tag.setParent(Tag)

getParent

public Tag getParent()
The Tag instance most closely enclosing this tag instance.

定義:
インタフェース Tag 内の getParent
戻り値:
the parent tag instance or null
関連項目:
Tag.getParent()

setId

public void setId(java.lang.String id)
Set the id attribute for this tag.

パラメータ:
id - The String for the id.

getId

public java.lang.String getId()
The value of the id attribute of this tag; or null.

戻り値:
the value of the id attribute, or null

setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pageContext)
Set the page context.

定義:
インタフェース Tag 内の setPageContext
パラメータ:
pageContext - The PageContext.
関連項目:
Tag.setPageContext(javax.servlet.jsp.PageContext)

setValue

public void setValue(java.lang.String k,
                     java.lang.Object o)
Associate a value with a String key.

パラメータ:
k - The key String.
o - The value to associate.

getValue

public java.lang.Object getValue(java.lang.String k)
Get a the value associated with a key.

パラメータ:
k - The string key.
戻り値:
The value associated with the key, or null.

removeValue

public void removeValue(java.lang.String k)
Remove a value associated with a key.

パラメータ:
k - The string key.

getValues

public java.util.Enumeration getValues()
Enumerate the keys for the values kept by this tag handler.

戻り値:
An enumeration of all the keys for the values set, or null or an empty Enumeration if no values have been set.

Ja-Jakarta
Translation

Copyright © 2000- The Apache Software Foundation. All rights Reserved.