Support for tag handlers for <forEach>, the core iteration
tag in JSTL 1.0. This class extends LoopTagSupport and provides
ForEach-specific functionality. The rtexprvalue library and the
expression-evaluating library each have handlers that extend this
class.
Localized here is the logic for handling the veritable smorgasbord
of types supported by <forEach>, including arrays,
Collections, and others. To see how the actual iteration is controlled,
review the org.apache.cocoon.taglib.core.LoopTagSupport class instead.
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.
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 container as a SAXException; a standalone Iterator
would not be able to do this. (This explains why LoopTagSupport
does not simply call for an Iterator from its subtags.)
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.