java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.jstl.core.LoopTagSupport
org.apache.taglibs.standard.tag.common.xml.ForEachTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.jstl.core.LoopTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
- public class ForEachTag
- extends javax.servlet.jsp.jstl.core.LoopTagSupport
Support for the XML library's <forEach> tag.
| Methods inherited from class javax.servlet.jsp.jstl.core.LoopTagSupport |
doAfterBody, doCatch, doFinally, doStartTag, getCurrent, getLoopStatus, setVar, setVarStatus, validateBegin, validateEnd, validateStep |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
select
private java.lang.String select
nodes
private java.util.List nodes
nodesIndex
private int nodesIndex
current
private org.w3c.dom.Node current
ForEachTag
public ForEachTag()
prepare
protected void prepare()
throws javax.servlet.jsp.JspTagException
- Description copied from class:
javax.servlet.jsp.jstl.core.LoopTagSupport
Prepares for a single tag invocation. Specifically, allows
subclasses to prepare for calls to hasNext() and next().
Subclasses can assume that prepare() will be called once for
each invocation of doStartTag() in the superclass.
hasNext
protected boolean hasNext()
throws javax.servlet.jsp.JspTagException
- Description copied from class:
javax.servlet.jsp.jstl.core.LoopTagSupport
Returns information concerning the availability of more items
over which to iterate. This method must be provided by concrete
subclasses of LoopTagSupport to assist the iterative logic
provided by the supporting base class.
See next for more information about the
purpose and expectations behind this tag.
next
protected java.lang.Object next()
throws javax.servlet.jsp.JspTagException
- Description copied from class:
javax.servlet.jsp.jstl.core.LoopTagSupport
Returns the next object over which the tag should iterate. This
method must be provided by concrete subclasses of LoopTagSupport
to inform the base logic about what objects it should iterate over.
It is expected that this method will generally be backed by an
Iterator, but this will not always be the case. In particular, if
retrieving the next object raises the possibility of an exception
being thrown, this method allows that exception to propagate back
to the JSP container as a JspTagException; a standalone Iterator
would not be able to do this. (This explains why LoopTagSupport
does not simply call for an Iterator from its subtags.)
release
public void release()
- Description copied from class:
javax.servlet.jsp.jstl.core.LoopTagSupport
- Releases any resources this LoopTagSupport may have (or inherit).
setSelect
public void setSelect(java.lang.String select)
setBegin
public void setBegin(int begin)
throws javax.servlet.jsp.JspTagException
setEnd
public void setEnd(int end)
throws javax.servlet.jsp.JspTagException
setStep
public void setStep(int step)
throws javax.servlet.jsp.JspTagException
getContext
public org.w3c.dom.Node getContext()
throws javax.servlet.jsp.JspTagException
init
private void init()
- Description copied from class:
javax.servlet.jsp.jstl.core.LoopTagSupport
- (Re)initializes state (during release() or construction)