|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.apache.struts.taglib.EnumerateTag
Custom tag that enumerates the elements of a collection, which can be either an attribute or the property of an attribute. The collection can be an Enumeration, a Vector, or an array of objects.
FIXME - Should support Java2 collection classes as well!
Field Summary | |
private java.lang.Object |
collection
The collection over which we will be iterating. |
private java.util.Enumeration |
enumeration
Enumeration of the elements of this collection. |
private java.lang.String |
id
The name of the scripting variable to be exposed. |
private java.lang.String |
length
The length value or attribute name (<=0 means no limit). |
private int |
lengthCount
The number of elements we have already rendered. |
private int |
lengthValue
The actual length value (calculated in the start tag). |
protected static MessageResources |
messages
The message resources for this package. |
private java.lang.String |
name
The name of the collection or owning bean. |
private java.lang.String |
offset
The starting offset (zero relative). |
private int |
offsetValue
The actual offset value (calculated in the start tag). |
private java.lang.String |
property
The property name containing the collection. |
Constructor Summary | |
EnumerateTag()
|
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 enumeration for the specified collection, and begin looping through the body once per element. |
java.lang.Object |
getCollection()
Return the collection over which we will be enumerating. |
java.lang.String |
getId()
Return the name of the scripting variable. |
java.lang.String |
getLength()
Return the length. |
java.lang.String |
getName()
Return the name of the collection or owning bean. |
java.lang.String |
getOffset()
Return the offset. |
java.lang.String |
getProperty()
Return the property name. |
void |
release()
Release any acquired resources. |
void |
setCollection(java.lang.Object collection)
Set the collection over which we will be enumerating. |
void |
setId(java.lang.String id)
Set the name of the scripting variable. |
void |
setLength(java.lang.String length)
Set the length. |
void |
setName(java.lang.String name)
Set the name of the collection or owning bean. |
void |
setOffset(java.lang.String offset)
Set the offset. |
void |
setProperty(java.lang.String property)
Set the property name. |
Field Detail |
private java.lang.Object collection
private java.util.Enumeration enumeration
private java.lang.String id
private java.lang.String length
private int lengthCount
private int lengthValue
protected static MessageResources messages
private java.lang.String name
private java.lang.String offset
private int offsetValue
private java.lang.String property
Constructor Detail |
public EnumerateTag()
Method Detail |
public java.lang.Object getCollection()
public void setCollection(java.lang.Object collection)
collection
- The new collectionpublic java.lang.String getId()
public void setId(java.lang.String id)
id
- The new name of the scripting variablepublic java.lang.String getLength()
public void setLength(java.lang.String length)
length
- The new lengthpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The new namepublic java.lang.String getOffset()
public void setOffset(java.lang.String offset)
offset
- The new offsetpublic java.lang.String getProperty()
public void setProperty(java.lang.String property)
property
- The property namepublic int doStartTag() throws javax.servlet.jsp.JspException
JspException
- if a JSP exception has occurredpublic int doAfterBody() throws javax.servlet.jsp.JspException
JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
JspException
- if a JSP exception has occurredpublic void release()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |