| javax.servlet.jsp.tagext.BodyTagSupport org.apache.struts.taglib.logic.IterateTag
All known Subclasses: org.apache.strutsel.taglib.logic.ELIterateTag, org.apache.struts.taglib.nested.logic.NestedIterateTag,
IterateTag | public class IterateTag extends BodyTagSupport (Code) | | Custom tag that iterates the elements of a collection, which can be either
an attribute or the property of an attribute. The collection can be any of
the following: an array of objects, an Enumeration, an Iterator, a
Collection (which includes Lists, Sets and Vectors), or a Map (which
includes Hashtables) whose elements will be iterated over.
version: $Rev: 471754 $ $Date: 2004-11-03 14:20:47 -0500 (Wed, 03 Nov 2004) version: $ |
Field Summary | |
protected Object | collection The collection over which we will be iterating. | protected String | id The name of the scripting variable to be exposed. | protected String | indexId The name of the scripting variable to be exposed as the current index. | protected Iterator | iterator Iterator of the elements of this collection, while we are actually
running. | protected String | length The length value or attribute name (<=0 means no limit). | protected int | lengthCount The number of elements we have already rendered. | protected int | lengthValue The actual length value (calculated in the start tag). | protected static MessageResources | messages The message resources for this package. | protected String | name The name of the collection or owning bean. | protected String | offset The starting offset (zero relative). | protected int | offsetValue The actual offset value (calculated in the start tag). | protected String | property The property name containing the collection. | protected String | scope The scope of the bean specified by the name property, if any. | protected boolean | started | protected String | type The Java class of each exposed element of the collection. |
collection | protected Object collection(Code) | | The collection over which we will be iterating.
|
id | protected String id(Code) | | The name of the scripting variable to be exposed.
|
indexId | protected String indexId(Code) | | The name of the scripting variable to be exposed as the current index.
|
iterator | protected Iterator iterator(Code) | | Iterator of the elements of this collection, while we are actually
running.
|
length | protected String length(Code) | | The length value or attribute name (<=0 means no limit).
|
lengthCount | protected int lengthCount(Code) | | The number of elements we have already rendered.
|
lengthValue | protected int lengthValue(Code) | | The actual length value (calculated in the start tag).
|
name | protected String name(Code) | | The name of the collection or owning bean.
|
offset | protected String offset(Code) | | The starting offset (zero relative).
|
offsetValue | protected int offsetValue(Code) | | The actual offset value (calculated in the start tag).
|
property | protected String property(Code) | | The property name containing the collection.
|
scope | protected String scope(Code) | | The scope of the bean specified by the name property, if any.
|
started | protected boolean started(Code) | | Has this tag instance been started?
|
type | protected String type(Code) | | The Java class of each exposed element of the collection.
|
doAfterBody | public int doAfterBody() throws JspException(Code) | | Make the next collection element available and loop, or finish the
iterations if there are no more elements.
throws: JspException - if a JSP exception has occurred |
doEndTag | public int doEndTag() throws JspException(Code) | | Clean up after processing this enumeration.
throws: JspException - if a JSP exception has occurred |
doStartTag | public int doStartTag() throws JspException(Code) | | Construct an iterator for the specified collection, and begin looping
through the body once per element.
throws: JspException - if a JSP exception has occurred |
getIndex | public int getIndex()(Code) | | Return the zero-relative index of the current iteration through the
loop. If you specify an offset , the first iteration
through the loop will have that value; otherwise, the first iteration
will return zero.
This property is read-only, and gives nested custom tags access to
this information. Therefore, it is only valid in
between calls to doStartTag() and doEndTag() .
|
release | public void release()(Code) | | Release all allocated resources.
|
setCollection | public void setCollection(Object collection)(Code) | | |
|
|