public abstract class LoopTagSupport extends TagSupport implements IterationTag, TryCatchFinally, LoopTag
Modifier and Type | Field and Description |
---|---|
protected int |
begin |
protected boolean |
beginSpecified |
protected ValueExpression |
deferredExpression |
protected int |
end |
protected boolean |
endSpecified |
protected java.lang.String |
itemId |
protected java.lang.String |
statusId |
protected int |
step |
protected boolean |
stepSpecified |
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
LoopTagSupport() |
Modifier and Type | Method and Description |
---|---|
int |
doAfterBody()
Processed to check if the tag should loop.
|
void |
doCatch(java.lang.Throwable t)
Invoked if any exception is thrown while evaluating the tag.
|
void |
doFinally()
Invoked after doEndTag even with an exception.
|
int |
doStartTag()
Starts the iteration.
|
java.lang.Object |
getCurrent()
Returns the current object.
|
protected java.lang.String |
getDelims() |
LoopTagStatus |
getLoopStatus()
Returns the loop status.
|
protected abstract boolean |
hasNext()
Returns true if there are more values in the tag.
|
protected abstract java.lang.Object |
next()
Returns the next object for the tag.
|
protected abstract void |
prepare()
Called before iteration starts
|
void |
setVar(java.lang.String id)
Sets the var attribute.
|
void |
setVarStatus(java.lang.String id)
Sets the var status attribute.
|
protected void |
validateBegin()
Checks that the begin property makes sense.
|
protected void |
validateEnd()
Checks that the end property makes sense.
|
protected void |
validateStep()
Checks that the step property makes sense.
|
doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
protected int begin
protected boolean beginSpecified
protected ValueExpression deferredExpression
protected int end
protected boolean endSpecified
protected int step
protected boolean stepSpecified
protected java.lang.String itemId
protected java.lang.String statusId
public void setVar(java.lang.String id)
public void setVarStatus(java.lang.String id)
protected void validateBegin() throws JspTagException
JspTagException
protected void validateEnd() throws JspTagException
JspTagException
protected void validateStep() throws JspTagException
JspTagException
protected abstract void prepare() throws JspTagException
JspTagException
protected abstract java.lang.Object next() throws JspTagException
JspTagException
protected abstract boolean hasNext() throws JspTagException
JspTagException
public java.lang.Object getCurrent()
getCurrent
in interface LoopTag
public LoopTagStatus getLoopStatus()
getLoopStatus
in interface LoopTag
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
public int doAfterBody() throws JspException
TagSupport
doAfterBody
in interface IterationTag
doAfterBody
in class TagSupport
JspException
public void doCatch(java.lang.Throwable t) throws java.lang.Throwable
TryCatchFinally
doCatch
in interface TryCatchFinally
t
- the thrown exceptionjava.lang.Throwable
public void doFinally()
TryCatchFinally
doFinally
in interface TryCatchFinally
protected java.lang.String getDelims()