| java.lang.Object javax.servlet.jsp.tagext.TagSupport org.apache.struts.taglib.html.OptionsTag
All known Subclasses: org.apache.struts.taglib.nested.html.NestedOptionsTag, org.apache.strutsel.taglib.html.ELOptionsTag,
OptionsTag | public class OptionsTag extends TagSupport (Code) | | Tag for creating multiple <select> options from a collection. The
associated values displayed to the user may optionally be specified by a
second collection, or will be the same as the values themselves. Each
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.
|
Field Summary | |
protected String | collection The name of the collection containing beans that have properties to
provide both the values and the labels (identified by the
property and labelProperty attributes). | protected boolean | filter | protected String | labelName The name of the bean containing the labels collection. | protected String | labelProperty The bean property containing the labels collection. | protected static MessageResources | messages The message resources for this package. | protected String | name The name of the bean containing the values collection. | protected String | property The name of the property to use to build the values collection. |
collection | protected String collection(Code) | | The name of the collection containing beans that have properties to
provide both the values and the labels (identified by the
property and labelProperty attributes).
|
filter | protected boolean filter(Code) | | Should the label values be filtered for HTML sensitive characters?
|
labelName | protected String labelName(Code) | | The name of the bean containing the labels collection.
|
labelProperty | protected String labelProperty(Code) | | The bean property containing the labels collection.
|
name | protected String name(Code) | | The name of the bean containing the values collection.
|
property | protected String property(Code) | | The name of the property to use to build the values collection.
|
addOption | protected void addOption(StringBuffer sb, String value, String label, boolean matched)(Code) | | Add an option element to the specified StringBuffer based on the
specified parameters. Note that this tag specifically does not
support the styleId tag attribute, which causes the HTML
id attribute to be emitted. This is because the HTML
specification states that all "id" attributes in a document have to be
unique. This tag will likely generate more than one
option element element, but it cannot use the same
id value. It's conceivable some sort of mechanism to
supply an array of id values could be devised, but that
doesn't seem to be worth the trouble.
Parameters: sb - StringBuffer accumulating our results Parameters: value - Value to be returned to the server for this option Parameters: label - Value to be shown to the user for this option Parameters: matched - Should this value be marked as selected? |
getFilter | public boolean getFilter()(Code) | | |
getIterator | protected Iterator getIterator(String name, String property) throws JspException(Code) | | Return an iterator for the option labels or values, based on our
configured properties.
Parameters: name - Name of the bean attribute (if any) Parameters: property - Name of the bean property (if any) throws: JspException - if an error occurs |
release | public void release()(Code) | | Release any acquired resources.
|
setCollection | public void setCollection(String collection)(Code) | | |
setFilter | public void setFilter(boolean filter)(Code) | | |
setLabelName | public void setLabelName(String labelName)(Code) | | |
setLabelProperty | public void setLabelProperty(String labelProperty)(Code) | | |
setStyleClass | public void setStyleClass(String styleClass)(Code) | | |
|
|