|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.
A tag handler that implements IterationTag is treated as one that
implements Tag regarding the doStartTag() and doEndTag() methods.
IterationTag provides a new method: doAfterBody()
.
The doAfterBody() method is invoked after every body evaluation to control whether the body will be reevaluated or not. If doAfterBody() returns IterationTag.EVAL_BODY_AGAIN, then the body will be reevaluated. If doAfterBody() returns Tag.SKIP_BODY, then the body will be skipped and doEndTag() will be evaluated instead.
Properties There are no new properties in addition to those in Tag.
Methods There is one new methods: doAfterBody().
Lifecycle
Lifecycle details are described by the transition diagram below. Exceptions that are thrown during the computation of doStartTag(), BODY and doAfterBody() interrupt the execution sequence and are propagated up the stack, unless the tag handler implements the TryCatchFinally interface; see that interface for details.
Empty and Non-Empty Action
If the TagLibraryDescriptor file indicates that the action must always have an empty action, by an <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY. Otherwise, the doStartTag() method may return SKIP_BODY or EVAL_BODY_INCLUDE.
If SKIP_BODY is returned the body is not evaluated, and then doEndTag() is invoked.
If EVAL_BODY_INCLUDE is returned, the body is evaluated and "passed through" to the current out, then doAfterBody() is invoked and, after zero or more iterations, doEndTag() is invoked.
フィールドの概要 | |
static int |
EVAL_BODY_AGAIN
Request the reevaluation of some body. |
インタフェース javax.servlet.jsp.tagext.Tag から継承したフィールド |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
メソッドの概要 | |
int |
doAfterBody()
Process body (re)evaluation. |
インタフェース javax.servlet.jsp.tagext.Tag から継承したメソッド |
doEndTag, doStartTag, getParent, release, setPageContext, setParent |
フィールドの詳細 |
public static final int EVAL_BODY_AGAIN
メソッドの詳細 |
public int doAfterBody() throws JspException
If doAfterBody returns EVAL_BODY_AGAIN, a new evaluation of the body will happen (followed by another invocation of doAfterBody). If doAfterBody returns SKIP_BODY no more body evaluations will occur, the value of out will be restored using the popBody method in pageContext, and then doEndTag will be invoked.
The method re-invocations may be lead to different actions because there might have been some changes to shared state, or because of external computation.
The JSP container will resynchronize any variable values that are indicated as so in TagExtraInfo after the invocation of doAfterBody().
JspException
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |