# com.bea.wlw.netui.tags.html
Select Class

public class Select
extends `OptionsDataSourceTag`
implements `Formattable`, `IAttributeConsumer`

Renders a select containing a set of SelectOptions. Select binds to an Iterator of Strings. If Select uses any Format tags, it must have those tags come before any nested SelectOption tags.

Attribute Descriptions
Attribute | Required | Runtime Expression Evaluation | Data Bindable
--- | --- | --- | ---
accessKey | No | No | No
Define the keyboard navigation key for the element.
dataSource | Yes | No | Read / Write
The name of a form bean property or an expression that contains the Select state.
defaultValue | No | No | Read Only
A literal value or an expression that is used to set the Select's initial state.
disabled | No | No | Read Only
A boolean value which if true will cause the Select to be disabled.
multiple | No | No | No
Whether or not multi-selection is enabled.
nullable | No | No | No
Whether a (null) option should be added to the bottom of the list. If the Select has multiple=true, (null) won't be shown regardless.
nullableOptionText | No | No | No
If `nullable` is `true`, then this is optional text for the option. The default is to use the empty string, "", as the value.
optionsDataSource | No | No | Read Only
An expression which is used to generate a set of dynamic SelectOption tags.
tagId | No | No | No
The ID of this select used by the enclosing html tag to get the tag's name for javascript and focus purposes.
size | No | No | No
The number of visible options.

Related Topics

<netui:select> Tag Sample
Dynamically Populating the Options in a Dropdown Sample
``SelectOption``

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`
  `DataSourceTag`
  `DefaultableDataSourceTag`
  `OptionsDataSourceTag`
  `Select`

All Implemented Interfaces
  `BodyTag`, `Formattable`, `IAttributeConsumer`, `IterationTag`, `Serializable`, `Tag`

## Field Summary

`public static final `String`` | `NULL_VALUE` String

Fields from com.bea.wlw.netui.tags`.`AbstractBaseTag``
``ATTR_GENERAL`, `ATTR_GENERAL_EXPRESSION`, `ATTR_JAVASCRIPT`, `ATTR_STYLE`, `CLASS`, `ID`, `JAVASCRIPT_STATUS`, `NAME`, `NETUI_UNIQUE_CNT`, `ONCLICK`, `ONDBLCLICK`, `ONKEYDOWN`, `ONKEYPRESS`, `ONKEYUP`, `ONMOUSEDOWN`, `ONMOUSEMOVE`, `ONMOUSEOUT`, `ONMOUSEOVER`, `ONMOUSEUP`, `STYLE`, `TABINDEX``

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

Fields from javax.servlet.jsp.tagext`.`TagSupport``
`id, pageContext`

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

Fields from interface javax.servlet.jsp.tagext`.`IterationTag``
`EVAL_BODY_AGAIN`

Fields from interface javax.servlet.jsp.tagext`.`Tag``
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

Select()

## Method Summary

`public void` | `addFormatter`(`FormatTag.Formatter` formatter) Adds a FormatTag.Formatter to the Select's set of formatters
`protected boolean` | `containsString`(`List` list, `String` value) Return true, if the list contains an Object.toString().equals(value).
`public int` | `doAfterBody`() Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.
`public int` | `doEndTag`() Render the end of this select.
`public int` | `doStartTag`() Render the beginning of this select.
`protected `Object`` | `evaluateDefaultValue`() Evaluate the defaultValues
`public `String`` | `getAccessKey`() Gets the accessKey attribute value.
`public `String`` | `getDisabled`() Returns the boolean value or expression indicating the disable state of the Select.
`public boolean` | `getMultiple`() Gets whether multiple selections are allowed.
`public `String`` | `getNullableOptionText`() If the `nullable`option is true, this is the text of that option.``
`public `String`` | `getOnBlur`() Gets the onBlur javascript event.
`public `String`` | `getOnChange`() Gets the onChange javascript event.
`public `String`` | `getOnClick`() Gets the onClick javascript event.
`public `String`` | `getOnDblClick`() Gets the onDblClick javascript event.
`public `String`` | `getOnFocus`() Gets the onFocus javascript event.
`public `String`` | `getOnKeyDown`() Gets the onKeyDown javascript event.
`public `String`` | `getOnKeyPress`() Gets the onKeyPress javascript event.
`public `String`` | `getOnKeyUp`() Gets the onKeyUp javascript event.
`public `String`` | `getOnMouseDown`() Gets the onMouseDown javascript event.
`public `String`` | `getOnMouseMove`() Gets the onMouseMove javascript event.
`public `String`` | `getOnMouseOut`() Gets the onMouseOut javascript event.
`public `String`` | `getOnMouseOver`() Gets the onMouseOver javascript event.
`public `String`` | `getOnMouseUp`() Gets the onMouseUp javascript event.
`public `String`` | `getOnSelect`() Gets the onSelect javascript event.
`public `String`` | `getSize`() Gets how many options are displayed.
`public `String`` | `getStyle`() Gets the style of the rendered html tag.
`public `String`` | `getStyleClass`() Gets the style class of the rendered html tag.
`public `String`` | `getTabindex`() Gets the tabIndex of the rendered html tag.
`public `String`` | `getTagId`() Return the ID of the select.
`public `String`` | `getTagName`() Return the name of the Tag.
`public boolean` | `isMatched`(`String` value) Does the specified value match one of those we are looking for?
`public boolean` | `isNullable`() Gets whether a null option is desired.
`protected void` | `localRelease`() Release any acquired resources.
`public void` | `setAccessKey`(`String` accessKey) Sets the accessKey attribute value.
`public void` | `setAttribute`(`String` name, `String` value) Set an attribute value.
`public void` | `setDisabled`(`String` disabled) Set the disable state either with the literal "true" or "false" or with an expression.
`public void` | `setMultiple`(boolean multiple) Set whether multiple selections are allowed.
`public void` | `setNullable`(boolean nullable) Set whethera null option is desired.
`public void` | `setNullableOptionText`(`String` nullableOptionText) Set the text of the nullable option.
`public void` | `setOnBlur`(`String` onblur) Sets the onBlur javascript event.
`public void` | `setOnChange`(`String` onchange) Sets the onChange javascript event.
`public void` | `setOnClick`(`String` onclick) Sets the onClick javascript event.
`public void` | `setOnDblClick`(`String` ondblclick) Sets the onDblClick javascript event.
`public void` | `setOnFocus`(`String` onblur) Sets the onFocus javascript event.
`public void` | `setOnKeyDown`(`String` onkeydown) Sets the onKeyDown javascript event.
`public void` | `setOnKeyPress`(`String` onkeypress) Sets the onKeyPress javascript event.
`public void` | `setOnKeyUp`(`String` onkeyup) Sets the onKeyUp javascript event.
`public void` | `setOnMouseDown`(`String` onmousedown) Sets the onMouseDown javascript event.
`public void` | `setOnMouseMove`(`String` onmousemove) Sets the onMouseMove javascript event.
`public void` | `setOnMouseOut`(`String` onmouseout) Sets the onMouseOut javascript event.
`public void` | `setOnMouseOver`(`String` onmouseover) Sets the onMouseOver javascript event.
`public void` | `setOnMouseUp`(`String` onmouseup) Sets the onMouseUp javascript event.
`public void` | `setOnSelect`(`String` onselect) Sets the onSelect javascript event.
`public void` | `setSize`(`String` size) Sets how many options are displayed.
`public void` | `setStyle`(`String` style) Sets the style of the rendered html tag.
`public void` | `setStyleClass`(`String` styleClass) Sets the style class of the rendered html tag.
`public void` | `setTabindex`(`String` tabindex) Sets the tabIndex of the rendered html tag.
`public void` | `setTagId`(`String` tagId) Set the ID of the select.

Methods from `com.bea.wlw.netui.tags.`OptionsDataSourceTag``
``getOptionsDataSource`, `setOptionsDataSource``

Methods from `com.bea.wlw.netui.tags.`DefaultableDataSourceTag``
``getDefaultValue`, `localRelease`, `setDefaultValue``

Methods from `com.bea.wlw.netui.tags.`DataSourceTag``
``getDataSource`, `localRelease`, `setDataSource``

Methods from `com.bea.wlw.netui.tags.`AbstractBaseTag``
``addTagIdMapping`, `evaluateAttributeToString`, `filter`, `filter`, `getJavaScriptUtils`, `getNearestForm`, `getScriptReporter`, `getUserLocale`, `localRelease`, `registerTagError`, `release`, `renderAttribute`, `rewriteName`, `write``

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doInitBody, getBodyContent, getPreviousOut, release, setBodyContent`

Methods from `javax.servlet.jsp.tagext.`TagSupport``
`doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `com.bea.wlw.netui.tags.html.`Formattable``
``addFormatter``

Methods from interface `com.bea.wlw.netui.tags.`IAttributeConsumer``
``setAttribute``

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Field Detail

### NULL_VALUE

    public static final String NULL_VALUE

## Constructor Detail

### Select

    public Select()

## Method Detail

### addFormatter(FormatTag.Formatter) Method

    public void addFormatter(FormatTag.Formatter formatter)

Adds a FormatTag.Formatter to the Select's set of formatters

#### Parameters

formatter
  - a FormatTag.Formatter added by a child FormatTag.

### containsString(List, String) Method

    protected boolean containsString(List list,
                                     String value)

Return true, if the list contains an Object.toString().equals(value).

### doAfterBody() Method

    public int doAfterBody()
         throws JspException

Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.

Overrides
  `BodyTagSupport.doAfterBody()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### doEndTag() Method

    public int doEndTag()
         throws JspException

Render the end of this select.

Overrides
  `BodyTagSupport.doEndTag()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### doStartTag() Method

    public int doStartTag()
         throws JspException

Render the beginning of this select.

Overrides
  `BodyTagSupport.doStartTag()`

#### Exceptions

``JspException``
  if a JSP exception has occurred

### evaluateDefaultValue() Method

    protected Object evaluateDefaultValue()

Evaluate the defaultValues

Overrides
  `DefaultableDataSourceTag.evaluateDefaultValue()`

### getAccessKey() Method

    public String getAccessKey()

Gets the accessKey attribute value.

#### Returns

the accessKey value.

### getDisabled() Method

    public String getDisabled()

Returns the boolean value or expression indicating the disable state of the Select.

#### Returns

the disabled state (true or false) or an expression

### getMultiple() Method

    public boolean getMultiple()

Gets whether multiple selections are allowed.

#### Returns

the multiple value

### getNullableOptionText() Method

    public String getNullableOptionText()

If the `nullable`option is true, this is the text of that option. The default is "";

#### Returns

the text of the nullable option

### getOnBlur() Method

    public String getOnBlur()

Gets the onBlur javascript event.

#### Returns

the onBlur event.

### getOnChange() Method

    public String getOnChange()

Gets the onChange javascript event.

#### Returns

the onChange event.

### getOnClick() Method

    public String getOnClick()

Gets the onClick javascript event.

#### Returns

the onClick event.

### getOnDblClick() Method

    public String getOnDblClick()

Gets the onDblClick javascript event.

#### Returns

the onDblClick event.

### getOnFocus() Method

    public String getOnFocus()

Gets the onFocus javascript event.

#### Returns

the onFocus event.

### getOnKeyDown() Method

    public String getOnKeyDown()

Gets the onKeyDown javascript event.

#### Returns

the onKeyDown event.

### getOnKeyPress() Method

    public String getOnKeyPress()

Gets the onKeyPress javascript event.

#### Returns

the onKeyPress event.

### getOnKeyUp() Method

    public String getOnKeyUp()

Gets the onKeyUp javascript event.

#### Returns

the onKeyUp event.

### getOnMouseDown() Method

    public String getOnMouseDown()

Gets the onMouseDown javascript event.

#### Returns

the onMouseDown event.

### getOnMouseMove() Method

    public String getOnMouseMove()

Gets the onMouseMove javascript event.

#### Returns

the onMouseMove event.

### getOnMouseOut() Method

    public String getOnMouseOut()

Gets the onMouseOut javascript event.

#### Returns

the onMouseOut event.

### getOnMouseOver() Method

    public String getOnMouseOver()

Gets the onMouseOver javascript event.

#### Returns

the onMouseOver event.

### getOnMouseUp() Method

    public String getOnMouseUp()

Gets the onMouseUp javascript event.

#### Returns

the onMouseUp event.

### getOnSelect() Method

    public String getOnSelect()

Gets the onSelect javascript event.

#### Returns

the onSelect event.

### getSize() Method

    public String getSize()

Gets how many options are displayed.

#### Returns

the size

### getStyle() Method

    public String getStyle()

Gets the style of the rendered html tag.

#### Returns

the style.

### getStyleClass() Method

    public String getStyleClass()

Gets the style class of the rendered html tag.

#### Returns

the style class.

### getTabindex() Method

    public String getTabindex()

Gets the tabIndex of the rendered html tag.

#### Returns

the tabindex.

### getTagId() Method

    public String getTagId()

Return the ID of the select.

#### Returns

the ID.

### getTagName() Method

    public String getTagName()

Return the name of the Tag.

Overrides
  `AbstractBaseTag.getTagName()`

### isMatched(String) Method

    public boolean isMatched(String value)

Does the specified value match one of those we are looking for?

#### Parameters

value
  Value to be compared

### isNullable() Method

    public boolean isNullable()

Gets whether a null option is desired.

#### Returns

the nullable value

### localRelease() Method

    protected void localRelease()

Release any acquired resources.

Overrides
  `OptionsDataSourceTag.localRelease()`

### setAccessKey(String) Method

    public void setAccessKey(String accessKey)

Sets the accessKey attribute value. This should key value of the keyboard navigation key. It is recommended not to use the following values because there are often used by browsers `A, C, E, F, G, H, V, left arrow, and right arrow`.

#### Parameters

accessKey
  - the accessKey value.

### setAttribute(String, String) Method

    public void setAttribute(String name,
                             String value)
         throws JspException

Set an attribute value. The `name` represents the name of the attribute. The `value` represents the value and may contain a netui expression. This method may result in errors being generated. This requires that the tag buffer its body and write attributes in the end tag. For the select tag it is not legal to set the `id` or `name` attributes with this method.

#### Parameters

name
  The name of the attribute. This value may not be null or the empty string.

value
  The value of the attribute. This may contain a netui expression.

#### Exceptions

``JspException``
  A JspException may be thrown if there is an error setting the attribute.

### setDisabled(String) Method

    public void setDisabled(String disabled)

Set the disable state either with the literal "true" or "false" or with an expression.

#### Parameters

disabled
  - true or false or an expression

### setMultiple(boolean) Method

    public void setMultiple(boolean multiple)

Set whether multiple selections are allowed.

#### Parameters

multiple
  - the multiple value ("true" or "false")

### setNullable(boolean) Method

    public void setNullable(boolean nullable)

Set whethera null option is desired.

#### Parameters

nullable
  - the nullable value

### setNullableOptionText(String) Method

    public void setNullableOptionText(String nullableOptionText)

Set the text of the nullable option. If the `nullable`option is true, this is the text of that option. The default is "";

#### Returns

the text of the nullable option

### setOnBlur(String) Method

    public void setOnBlur(String onblur)

Sets the onBlur javascript event.

#### Parameters

onblur
  - the onBlur event.

### setOnChange(String) Method

    public void setOnChange(String onchange)

Sets the onChange javascript event.

#### Parameters

onchange
  - the onChange event.

### setOnClick(String) Method

    public void setOnClick(String onclick)

Sets the onClick javascript event.

#### Parameters

onclick
  - the onClick event.

### setOnDblClick(String) Method

    public void setOnDblClick(String ondblclick)

Sets the onDblClick javascript event.

#### Parameters

ondblclick
  - the onDblClick event.

### setOnFocus(String) Method

    public void setOnFocus(String onblur)

Sets the onFocus javascript event.

#### Parameters

onblur
  - the onFocus event.

### setOnKeyDown(String) Method

    public void setOnKeyDown(String onkeydown)

Sets the onKeyDown javascript event.

#### Parameters

onkeydown
  - the onKeyDown event.

### setOnKeyPress(String) Method

    public void setOnKeyPress(String onkeypress)

Sets the onKeyPress javascript event.

#### Parameters

onkeypress
  - the onKeyPress event.

### setOnKeyUp(String) Method

    public void setOnKeyUp(String onkeyup)

Sets the onKeyUp javascript event.

#### Parameters

onkeyup
  - the onKeyUp event.

### setOnMouseDown(String) Method

    public void setOnMouseDown(String onmousedown)

Sets the onMouseDown javascript event.

#### Parameters

onmousedown
  - the onMouseDown event.

### setOnMouseMove(String) Method

    public void setOnMouseMove(String onmousemove)

Sets the onMouseMove javascript event.

#### Parameters

onmousemove
  - the onMouseMove event.

### setOnMouseOut(String) Method

    public void setOnMouseOut(String onmouseout)

Sets the onMouseOut javascript event.

#### Parameters

onmouseout
  - the onMouseOut event.

### setOnMouseOver(String) Method

    public void setOnMouseOver(String onmouseover)

Sets the onMouseOver javascript event.

#### Parameters

onmouseover
  - the onMouseOver event.

### setOnMouseUp(String) Method

    public void setOnMouseUp(String onmouseup)

Sets the onMouseUp javascript event.

#### Parameters

onmouseup
  - the onMouseUp event.

### setOnSelect(String) Method

    public void setOnSelect(String onselect)

Sets the onSelect javascript event.

#### Parameters

onselect
  - the onSelect event.

### setSize(String) Method

    public void setSize(String size)

Sets how many options are displayed.

#### Parameters

size
  - the size (a number)

### setStyle(String) Method

    public void setStyle(String style)

Sets the style of the rendered html tag.

#### Parameters

style
  - the html style.

### setStyleClass(String) Method

    public void setStyleClass(String styleClass)

Sets the style class of the rendered html tag.

#### Parameters

styleClass
  - the html style class.

### setTabindex(String) Method

    public void setTabindex(String tabindex)

Sets the tabIndex of the rendered html tag.

#### Parameters

tabindex
  - the tab index.

### setTagId(String) Method

    public void setTagId(String tagId)

Set the ID of the select.

#### Parameters

tagId
  - the ID.

````