Package jakarta.servlet.jsp.jstl.core
Interface LoopTag
-
- All Known Implementing Classes:
LoopTagSupport
public interface LoopTag extends Tag
The Jakarta Standard Tag Library allows developers to write custom iteration tags by implementing the LoopTag interface. This is not to be confused with
jakarta.servlet.jsp.tagext.IterationTag
as defined in Jakarta Server Pages 1.2. LoopTag establishes a mechanism for iteration tags to be recognized and for type-safe implicit collaboration with custom subtags.In most cases, it will not be necessary to implement this interface manually, for a base support class (
LoopTagSupport
) is provided to facilitate implementation.- Author:
- Shawn Bayern
-
-
Field Summary
-
Fields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getCurrent()
Retrieves the current item in the iteration.LoopTagStatus
getLoopStatus()
Retrieves a 'status' object to provide information about the current round of the iteration.-
Methods inherited from interface jakarta.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
-
-
-
-
Method Detail
-
getCurrent
Object getCurrent()
Retrieves the current item in the iteration. Behaves idempotently; calling getCurrent() repeatedly should return the same Object until the iteration is advanced. (Specifically, calling getCurrent() does not advance the iteration.)- Returns:
- the current item as an object
-
getLoopStatus
LoopTagStatus getLoopStatus()
Retrieves a 'status' object to provide information about the current round of the iteration.- Returns:
- The LoopTagStatus for the current
LoopTag
.
-
-