java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.struts.taglib.wml.OptionsCollectionTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class OptionsCollectionTag
- extends javax.servlet.jsp.tagext.TagSupport
Tag for creating multiple <select> options from a collection. The
collection may be part of the enclosing form, or may be independent of
the form. Each element of the collection must expose a 'label' and a
'value', the property names of which are configurable by attributes of
this tag.
The collection may be an array of objects, a Collection, an Enumeration,
an Iterator, or a Map.
NOTE - This tag requires a Java2 (JDK 1.2 or later) platform.
- Since:
- Struts 1.1
- Version:
- $Revision: 1.1.1.1 $ $Date: 2002/12/03 18:08:27 $,
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messages
protected static org.apache.struts.util.MessageResources messages
- The message resources for this package.
label
protected java.lang.String label
- The name of the bean property containing the label.
name
protected java.lang.String name
- The name of the bean containing the values collection.
property
protected java.lang.String property
- The name of the property to use to build the values collection.
value
protected java.lang.String value
- The name of the bean property containing the value.
OptionsCollectionTag
public OptionsCollectionTag()
getLabel
public java.lang.String getLabel()
setLabel
public void setLabel(java.lang.String label)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getProperty
public java.lang.String getProperty()
setProperty
public void setProperty(java.lang.String property)
getValue
public java.lang.String getValue()
setValue
public void setValue(java.lang.String value)
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Process the start of this tag.
release
public void release()
- Release any acquired resources.
addOption
protected void addOption(java.lang.StringBuffer sb,
java.lang.String label,
java.lang.String value)
- Add an option element to the specified StringBuffer based on the
specified parameters.
getIterator
protected java.util.Iterator getIterator(java.lang.Object collection)
throws javax.servlet.jsp.JspException
- Return an iterator for the option labels or values, based on our
configured properties.