public class ForEachTag extends LoopTagSupport
LoopTagSupport,
Serialized Formbegin, beginSpecified, deferredExpression, end, endSpecified, itemId, statusId, step, stepSpecifiedid, pageContextEVAL_BODY_AGAINEVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE| Constructor and Description |
|---|
ForEachTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doAfterBody()
Continues the iteration when appropriate -- that is, if we (a) have
more items and (b) don't run over our 'end' (given our 'step').
|
void |
doFinally()
Removes any attributes that this LoopTagSupport set.
|
protected boolean |
hasNext()
Returns information concerning the availability of more items
over which to iterate.
|
protected Object |
next()
Returns the next object over which the tag should iterate.
|
protected void |
prepare()
Prepares for a single tag invocation.
|
void |
release()
Releases any resources this LoopTagSupport may have (or inherit).
|
void |
setBegin(int begin) |
void |
setEnd(int end) |
void |
setSelect(String select) |
void |
setStep(int step) |
doCatch, doStartTag, getCurrent, getDelims, getLoopStatus, setVar, setVarStatus, validateBegin, validateEnd, validateStepdoEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoEndTag, getParent, setPageContext, setParentpublic void release()
LoopTagSupportrelease in interface Tagrelease in class LoopTagSupportTag.release()protected void prepare()
throws JspTagException
LoopTagSupportPrepares 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.
prepare in class LoopTagSupportJspTagExceptionprotected boolean hasNext()
throws JspTagException
LoopTagSupportReturns 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.
hasNext in class LoopTagSupportJspTagExceptionLoopTagSupport.next()protected Object next() throws JspTagException
LoopTagSupportReturns 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.)
next in class LoopTagSupportJspTagException - for other, unexpected exceptionspublic int doAfterBody()
throws JspException
LoopTagSupportdoAfterBody in interface IterationTagdoAfterBody in class LoopTagSupportJspException - if an error occurs while processing this tagIterationTag.doAfterBody()public void doFinally()
LoopTagSupportThese attributes are intended to support scripting variables with NESTED scope, so we don't want to pollute attribute space by leaving them lying around.
doFinally in interface TryCatchFinallydoFinally in class LoopTagSupportpublic void setSelect(String select)
public void setBegin(int begin)
throws JspTagException
JspTagExceptionpublic void setEnd(int end)
throws JspTagException
JspTagExceptionpublic void setStep(int step)
throws JspTagException
JspTagExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.