iterationtag.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 301 行
HTML
301 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:39 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Interface IterationTag
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html"><B>PREV CLASS</B></A>
<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="IterationTag.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.servlet.jsp.tagext</FONT>
<BR>
Interface IterationTag</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html">Tag</A></DD>
</DL>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html">BodyTag</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../javax/servlet/jsp/tagext/TagSupport.html">TagSupport</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>IterationTag</B><DT>extends <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html">Tag</A></DL>
<P>
The IterationTag interface extends Tag by defining one additional
method that controls the reevaluation of its body.
<p> A tag handler that implements IterationTag is treated as one that
implements Tag regarding the doStartTag() and doEndTag() methods.
IterationTag provides a new method: <code>doAfterBody()</code>.
<p> 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.
<p><B>Properties</B>
There are no new properties in addition to those in Tag.
<p><B>Methods</B>
There is one new methods: doAfterBody().
<p><B>Lifecycle</B>
<p> 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.
<p>
<IMG src="doc-files/IterationTagProtocol.gif"/>
<p><B>Empty and Non-Empty Action</B>
<p> 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.
<p>
If SKIP_BODY is returned the body is not evaluated, and then doEndTag()
is invoked.
<p>
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.
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/IterationTag.html#EVAL_BODY_AGAIN">EVAL_BODY_AGAIN</A></B></CODE>
<BR>
Request the reevaluation of some body.</TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.servlet.jsp.tagext.Tag"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from interface javax.servlet.jsp.tagext.<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html">Tag</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#EVAL_BODY_INCLUDE">EVAL_BODY_INCLUDE</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#EVAL_PAGE">EVAL_PAGE</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#SKIP_BODY">SKIP_BODY</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#SKIP_PAGE">SKIP_PAGE</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/servlet/jsp/tagext/IterationTag.html#doAfterBody()">doAfterBody</A></B>()</CODE>
<BR>
Process body (re)evaluation.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.servlet.jsp.tagext.Tag"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.servlet.jsp.tagext.<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html">Tag</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#doEndTag()">doEndTag</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#doStartTag()">doStartTag</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#getParent()">getParent</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#release()">release</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#setPageContext(javax.servlet.jsp.PageContext)">setPageContext</A>, <A HREF="../../../../javax/servlet/jsp/tagext/Tag.html#setParent(javax.servlet.jsp.tagext.Tag)">setParent</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="EVAL_BODY_AGAIN"><!-- --></A><H3>
EVAL_BODY_AGAIN</H3>
<PRE>
public static final int <B>EVAL_BODY_AGAIN</B></PRE>
<DL>
<DD>Request the reevaluation of some body.
Returned from doAfterBody.
For compatibility with JSP 1.1, the value is carefully selected
to be the same as the, now deprecated, BodyTag.EVAL_BODY_TAG,</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="doAfterBody()"><!-- --></A><H3>
doAfterBody</H3>
<PRE>
public int <B>doAfterBody</B>()
throws <A HREF="../../../../javax/servlet/jsp/JspException.html">JspException</A></PRE>
<DL>
<DD>Process body (re)evaluation. This method is invoked by the
JSP Page implementation object after every evaluation of
the body into the BodyEvaluation object. The method is
not invoked if there is no body evaluation.
<p>
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.
<p>
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.
<p>
The JSP container will resynchronize
any variable values that are indicated as so in TagExtraInfo after the
invocation of doAfterBody().<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>whether additional evaluations of the body are desired<DT><B>Throws:</B><DD><CODE><A HREF="../../../../javax/servlet/jsp/JspException.html">JspException</A></CODE> - </DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../javax/servlet/jsp/tagext/BodyTag.html"><B>PREV CLASS</B></A>
<A HREF="../../../../javax/servlet/jsp/tagext/Tag.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="IterationTag.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?