| java.lang.Object org.apache.commons.jelly.TagSupport org.apache.commons.jelly.tags.core.ForEachTag
ForEachTag | public class ForEachTag extends TagSupport (Code) | | Iterates over a collection, iterator or an array of objects.
Uses the same syntax as the JSTL
forEach tag does.
author: James Strachan version: $Revision: 155420 $ |
Inner Class :final public static class LoopStatus implements LoopTagStatus | |
ForEachTag | public ForEachTag()(Code) | | |
setBegin | public void setBegin(int begin)(Code) | | Sets the starting index value
|
setEnd | public void setEnd(int end)(Code) | | Sets the ending index value
|
setIndexVar | public void setIndexVar(String indexVar)(Code) | | Sets the variable name to export the current index counter to
|
setItems | public void setItems(Expression items)(Code) | | Sets the expression used to iterate over.
This expression could resolve to an Iterator, Collection, Map, Array,
Enumeration or comma separated String.
|
setStep | public void setStep(int step)(Code) | | Sets the index increment step
|
setVar | public void setVar(String var)(Code) | | Sets the variable name to export for the item being iterated over
|
setVarStatus | public void setVarStatus(String var)(Code) | | Sets the variable name to export the current status to.
The status is an implementation of the JSTL LoopTagStatus interface that provides
the following bean properties:
- current - the current value of the loop items being iterated
- index - the current index of the items being iterated
- first - true if this is the first iteration, false otherwise
- last - true if this is the last iteration, false otherwise
- begin - the starting index of the loop
- step - the stepping value of the loop
- end - the end index of the loop
|
|
|