h
Tag selectManyListbox


<p>Render an HTML option list.</p><p>Decode Behavior</p><p>This section documents the decode behavior for all renderers that handle <code>UISelectMany</code> or <code>UISelectOne</code> components.</p><ul><p><a name="decodeMany">Decode Behavior for<code>UISelectMany</code> components</a></p><ul><p>Obtain the <code>Map</code> from the "requestParameterValuesMap" property of the<code>ExternalContext</code>. If the <code>Map</code> contains an entry for the "clientId" of the component, pass the value of the entry, cast to a <code>String []</code>, to the<code>setSubmittedValue()</code> method of the component, which must be an <code>EditableValueHolder</code>. If the<code>Map</code> does not contain an entry, create an empty<code>String</code> array and call<code>setSubmittedValue()</code> with it.</p></ul><p><a name="decodeOne">Decode Behavior for<code>UISelectOne</code> components</a></p><ul><p>Obtain the <code>Map</code> from the "requestParameterMap" property of the <code>ExternalContext</code>. If there is a<code>Map</code> entry for the "clientId" property of the component, pass it to the <code>setSubmittedValue()</code> method of the component.</p></ul><p>Encode Behavior</p><ul><p>Render an HTML "select" element. Render the clientId of the component as the value of the "name" attribute. If the "styleClass" attribute is specified, render its value as the value of the "class" attribute on the "select" element. If the component is a <code>UISelectMany</code> instance, render "multiple" as the value of the "multiple" attribute. If the "size" attribute is specified, render its value as the value of the "size" attribute. Otherwise use the number of items as the value of the "size" attribute.</p></ul><p><a name="option">Rendering the "option" elements</a></p><ul><p>The only valid children of this component are<code>UISelectItem</code> or <code>UISelectItems</code> instances. Iterate over the children of this component, and accrue a list of<code>javax.faces.model.SelectItem</code> instances. If the current child is a <code>UISelectItem</code> create a<code>SelectItem</code>instance from its <code>itemValue, itemLabel</code> and <code>itemDescription</code> properties, add it to the list. If the current child is a<code>UISelectItems</code> instance, call its<code>getValue()</code> method. If the result is a<code>SelectItem</code> bean, add it to the list. If the result is an array of <code>SelectItem</code> beans, add each one t othe list. If the result is a <code>Collection</code> of<code>SelectItem</code> beans, add each one to the list. If the result isa <code>Map</code>, create a <code>SelectItem</code> bean for each entry in the <code>Map</code> using the key as the label, the value as the value, and <code>null</code> as the description. Iterate over the list of <code>SelectItem</code> beans. If the current element is a <code>SelectItemGroup</code>, render an "optgroup" element with a "label" attribute, the value of which is the "label" property from the current element, then call<code>getSelectItems()</code> and render each element as below. If the current element is not a <code>SelectItemGroup</code>, render an "option" element. Follow the conversion rules in the spec to obtain a renderable <code>String</code> from the "value" property of the current element, render that as the value of the "value" atribute. Now it is time to see if the current element is the selected value. call its<code>getSubmittedValue()</code> method, casting the result to an<code>Object []</code>, otherwise the component must be a<code>UISelectOne</code> instance, call its<code>getSubmittedValue()</code> method and create an <code>Object []</code> around the result. If the resultant array is non-null, we look in the array for a value that, when we pass the renderable value to its <code>equals()</code> method, it returns<code>true</code>, meaning the current element is selected. If the resultant array is <code>null</code>, if the component is a<code>UISelectMany</code>, call its <code>getValue()</code> method. If the result is a <code>List</code> obtain the values in the list as an array. Otherwise, the component must be a<code>UISelectOne</code> instance. Call its<code>getValue()</code> method, which must be an Object array. Look for an element in the resultant array that, 1. when we pass the renderable value to its <code>equals()</code> method, it returns <code>true</code> , or 2. if the renderable value is null, and there is a null element in the array, also conclude that the current element is selected. Otherwise the current element is not selected. Now, if the current value is selected, write out an HTML boolean property "selected". If the current SelectItem.isDisabled() returns true, render "disabled" as the value of the "disabled" attribute.</p></ul></ul>


Tag Information
Tag Classcom.sun.faces.taglib.html_basic.SelectManyListboxTag
TagExtraInfo Classcom.sun.faces.taglib.FacesTagExtraInfo
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
converterfalsefalsejava.lang.String Converter instance registered with this component.
idfalsefalsejava.lang.String The component identifier for this component. This value must be unique within the closest parent component that is a naming container.
immediatefalsefalsejava.lang.String Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase.
renderedfalsefalsejava.lang.String Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
requiredfalsefalsejava.lang.String Flag indicating that the user is required to provide a submitted value for this input component.
validatorfalsefalsejava.lang.String MethodBinding representing a validator method that will be called during Process Validations to perform correctness checks on the value of this component. The expression must evaluate to a public method that takes FacesContext, UIComponent, and Object parameters, with a return type of void.
valuefalsefalsejava.lang.String The current value of this component.
valueChangeListenerfalsefalsejava.lang.String MethodBinding representing a value change listener method that will be notified when a new value has been set for this input component. The expression must evaluate to a public method that takes a ValueChangeEvent parameter, with a return type of void.
accesskeyfalsefalsejava.lang.String Access key that, when pressed, transfers focus to this element.
dirfalsefalsejava.lang.String Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
disabledfalsefalsejava.lang.String Flag indicating that this element must never receive focus or be included in a subsequent submit.
disabledClassfalsefalsejava.lang.String CSS style class to apply to the rendered label on disabled options.
enabledClassfalsefalsejava.lang.String CSS style class to apply to the rendered label on enabled options.
langfalsefalsejava.lang.String Code describing the language used in the generated markup for this component.
onblurfalsefalsejava.lang.String Javascript code executed when this element loses focus.
onchangefalsefalsejava.lang.String Javascript code executed when this element loses focus and its value has been modified since gaining focus.
onclickfalsefalsejava.lang.String Javascript code executed when a pointer button is clicked over this element.
ondblclickfalsefalsejava.lang.String Javascript code executed when a pointer button is double clicked over this element.
onfocusfalsefalsejava.lang.String Javascript code executed when this element receives focus.
onkeydownfalsefalsejava.lang.String Javascript code executed when a key is pressed down over this element.
onkeypressfalsefalsejava.lang.String Javascript code executed when a key is pressed and released over this element.
onkeyupfalsefalsejava.lang.String Javascript code executed when a key is released over this element.
onmousedownfalsefalsejava.lang.String Javascript code executed when a pointer button is pressed down over this element.
onmousemovefalsefalsejava.lang.String Javascript code executed when a pointer button is moved within this element.
onmouseoutfalsefalsejava.lang.String Javascript code executed when a pointer button is moved away from this element.
onmouseoverfalsefalsejava.lang.String Javascript code executed when a pointer button is moved onto this element.
onmouseupfalsefalsejava.lang.String Javascript code executed when a pointer button is released over this element.
onselectfalsefalsejava.lang.String Javascript code executed when text within this element is selected by the user.
readonlyfalsefalsejava.lang.String Flag indicating that this component will prohibit changes by the user. The element may receive focus unless it has also been disabled.
sizefalsefalsejava.lang.String Number of available options to be shown at all times. If not specified, all available options are shown.
stylefalsefalsejava.lang.String CSS style(s) to be applied when this component is rendered.
styleClassfalsefalsejava.lang.String Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.
tabindexfalsefalsejava.lang.String Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767.
titlefalsefalsejava.lang.String Advisory title information about markup elements generated for this component.
bindingfalsefalsejava.lang.String The value binding expression linking this component to a property in a backing bean

Variables
No Variables Defined.


Output Generated by TLDDoc, a Sun Microsystems, Inc. CoolStuff project. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.