org.apache.struts.taglib.logic
public class IterateTag extends BodyTagSupport
Version: $Rev: 56513 $ $Date: 2004-11-03 19:20:47 +0000 (Wed, 03 Nov 2004) $
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
Has this tag instance been started? |
protected String | type
The Java class of each exposed element of the collection. |
Method Summary | |
---|---|
int | doAfterBody()
Make the next collection element available and loop, or
finish the iterations if there are no more elements.
|
int | doEndTag()
Clean up after processing this enumeration.
|
int | doStartTag()
Construct an iterator for the specified collection, and begin
looping through the body once per element.
|
Object | getCollection() |
String | getId() |
int | getIndex() Return the zero-relative index of the current iteration through the loop. |
String | getIndexId() |
String | getLength() |
String | getName() |
String | getOffset() |
String | getProperty() |
String | getScope() |
String | getType() |
void | release()
Release all allocated resources. |
void | setCollection(Object collection) |
void | setId(String id) |
void | setIndexId(String indexId) |
void | setLength(String length) |
void | setName(String name) |
void | setOffset(String offset) |
void | setProperty(String property) |
void | setScope(String scope) |
void | setType(String type) |
Throws: JspException if a JSP exception has occurred
Throws: JspException if a JSP exception has occurred
Throws: JspException if a JSP exception has occurred
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()
.