org.richfaces.component

## Class AbstractSelect

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - javax.faces.component.UIOutput
      - - javax.faces.component.UIInput
        - - javax.faces.component.UISelectOne
          - - org.richfaces.component.AbstractSelectComponent
            - - org.richfaces.component.AbstractSelect

- All Implemented Interfaces:
    EventListener, javax.faces.component.EditableValueHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, AutocompleteProps, CoreProps, DisabledProps, EventsKeyProps, EventsMouseProps, FocusProps, SelectItemsProps, SelectProps, MetaComponentEncoder, MetaComponentResolver, SelectItemsInterface
  Direct Known Subclasses:
    UISelect

      public abstract class AbstractSelect
      extends AbstractSelectComponent
      implements SelectItemsInterface, MetaComponentResolver, MetaComponentEncoder, CoreProps, DisabledProps, EventsKeyProps, EventsMouseProps, SelectProps, AutocompleteProps, SelectItemsProps

  The <rich:select> component provides a drop-down list box for selecting a single value from multiple options. The <rich:select> component can be configured as a combo-box, where it will accept typed input. The component also supports keyboard navigation. The <rich:select> component functions similarly to the JSF UISelectOne component.

  The <rich:select> can optionally be used in an auto-completing mode, where the values in the drop-down list are provided dynamically using either the autocompleteMethod or autocompleteList attributes. If these attributes are omitted, the component operates in the traditional non-auto-completing mode. Refer to the individual attribute documentation to see which attributes are applicable only with an auto-completing select list.

  Author:
    abelevich, Brian Leathem

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static String` | `ITEMS_META_COMPONENT_ID`

    - ### Fields inherited from class javax.faces.component.UISelectOne

      `INVALID_MESSAGE_ID`

    - ### Fields inherited from class javax.faces.component.UIInput

      `CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

    - ### Fields inherited from interface org.richfaces.component.MetaComponentResolver

      `META_COMPONENT_SEPARATOR_CHAR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSelect()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encodeMetaComponent(javax.faces.context.FacesContext context, String metaComponentId)`
    `abstract String` | `getActiveClass()` Space-separated list of CSS style class(es) to be applied to the list element when it is in the "active" state.
    `abstract String` | `getChangedClass()` Space-separated list of CSS style class(es) to be applied to the list element when it is in the "changed" state.
    `abstract String` | `getClientFilterFunction()` A javascript function used to filter the list of items in the select popup
    `abstract String` | `getDisabledClass()` Space-separated list of CSS style class(es) to be applied to the list element when it is disabled.
    `abstract Object` | `getItemLabel()` Label to be displayed to the user for the corresponding option.
    `abstract Object` | `getItemValue()` Value to be returned to the server if the corresponding option is selected by the user.
    `Object` | `getItemValues()`
    `abstract String` | `getMaxListHeight()` The maximum height of the list
    `abstract String` | `getMinListHeight()` The minimum height ot the list
    `abstract String` | `getOnbeforedomupdate()` The client-side script method to be called after the ajax response comes back, but before the DOM is updated.
    `abstract String` | `getOnbegin()` The client-side script method to be called before an ajax request.
    `abstract String` | `getOncomplete()` The client-side script method to be called after the DOM is updated.
    `abstract String` | `getStatus()` Name of the request status component that will indicate the status of the Ajax request.
    `abstract String` | `getVar()` Expose the values from either the autocompleteList or autocompleteMethod attributes under a request scoped key so that the values may be referred to in an EL expression while rendering this component.
    `abstract boolean` | `isEnableManualInput()` If "true" Allows the user to type into a text field to scroll through or filter the list.
    `abstract boolean` | `isSelectFirst()` If "true" as the user types to narrow the list, automatically select the first element in the list.
    `abstract boolean` | `isShowButton()` When "true" display a button to expand the popup list
    `void` | `processEvent(javax.faces.event.ComponentSystemEvent event)`
    `String` | `resolveClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)` Resolves and returns string identifying supported meta-component or `null` if provided meta-component name is not a supported one.
    `String` | `substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent contextComponent, String metaComponentId)` Provides replacement for unresolved meta-component names.
    `protected void` | `validateValue(javax.faces.context.FacesContext facesContext, Object value)` Override the validateValue method in cases where the component implements SelectItemsInterface
    `boolean` | `visitTree(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)`

    - ### Methods inherited from class org.richfaces.component.AbstractSelectComponent

      `getOnchange, getOnlistclick, getOnlistdblclick, getOnlisthide, getOnlistkeydown, getOnlistkeypress, getOnlistkeyup, getOnlistmousedown, getOnlistmousemove, getOnlistmouseout, getOnlistmouseover, getOnlistmouseup, getOnlistshow, getOnselectitem`

    - ### Methods inherited from class javax.faces.component.UISelectOne

      `getFamily`

    - ### Methods inherited from class javax.faces.component.UIInput

      `addValidator, addValueChangeListener, broadcast, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate`

    - ### Methods inherited from class javax.faces.component.UIOutput

      `getConverter, getLocalValue, setConverter`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.richfaces.component.attribute.CoreProps

      `getStyle, getStyleClass, getTitle`

    - ### Methods inherited from interface org.richfaces.component.attribute.DisabledProps

      `isDisabled`

    - ### Methods inherited from interface org.richfaces.component.attribute.EventsKeyProps

      `getOnkeydown, getOnkeypress, getOnkeyup`

    - ### Methods inherited from interface org.richfaces.component.attribute.EventsMouseProps

      `getOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup`

    - ### Methods inherited from interface org.richfaces.component.attribute.SelectProps

      `getDefaultLabel, getItemClass, getListClass, getListHeight, getListWidth, getSelectItemClass`

    - ### Methods inherited from interface org.richfaces.component.attribute.AutocompleteProps

      `getAutocompleteList, getAutocompleteMethod, getAutocompleteMethodWithOneParameter, getMinChars, getMode, setAutocompleteMethod, setAutocompleteMethodWithOneParameter`

    - ### Methods inherited from interface org.richfaces.component.attribute.FocusProps

      `getOnblur, getOnfocus, getTabindex`

    - ### Methods inherited from interface javax.faces.component.ValueHolder

      `getConverter, getLocalValue, setConverter`

- - ### Field Detail

    - #### ITEMS_META_COMPONENT_ID

          public static final String ITEMS_META_COMPONENT_ID

      See Also:
        Constant Field Values

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractSelect

          public AbstractSelect()

  - ### Method Detail

    - #### getItemValues

          public Object getItemValues()

      Specified by:
        `getItemValues` in interface `SelectItemsInterface`

    - #### isEnableManualInput

          public abstract boolean isEnableManualInput()

      If "true" Allows the user to type into a text field to scroll through or filter the list. Implicitly true when using an auto-completing select list.

      Default is "false"

    - #### isSelectFirst

          public abstract boolean isSelectFirst()

      If "true" as the user types to narrow the list, automatically select the first element in the list. Applicable only when enableManualInput is "true".

      Default is "true"

    - #### isShowButton

          public abstract boolean isShowButton()

      When "true" display a button to expand the popup list

      Default is "true"

    - #### getMinListHeight

          public abstract String getMinListHeight()

      The minimum height ot the list

    - #### getMaxListHeight

          public abstract String getMaxListHeight()

      The maximum height of the list

    - #### getClientFilterFunction

          public abstract String getClientFilterFunction()

      A javascript function used to filter the list of items in the select popup

    - #### getActiveClass

          public abstract String getActiveClass()

      Description copied from interface: `SelectProps`
      Space-separated list of CSS style class(es) to be applied to the list element when it is in the "active" state. This value must be passed through as the "class" attribute on generated markup.
      Specified by:
        `getActiveClass` in interface `SelectProps`

    - #### getChangedClass

          public abstract String getChangedClass()

      Description copied from interface: `SelectProps`
      Space-separated list of CSS style class(es) to be applied to the list element when it is in the "changed" state. This value must be passed through as the "class" attribute on generated markup.
      Specified by:
        `getChangedClass` in interface `SelectProps`

    - #### getDisabledClass

          public abstract String getDisabledClass()

      Description copied from interface: `SelectProps`
      Space-separated list of CSS style class(es) to be applied to the list element when it is disabled. This value must be passed through as the "class" attribute on generated markup.
      Specified by:
        `getDisabledClass` in interface `SelectProps`

    - #### getItemValue

          public abstract Object getItemValue()

      Value to be returned to the server if the corresponding option is selected by the user. Used only with an auto-completing select, where the list of items comes from either the autocompleteList or autocompleteMethod attributes.
      Specified by:
        `getItemValue` in interface `SelectItemsProps`

    - #### getItemLabel

          public abstract Object getItemLabel()

      Label to be displayed to the user for the corresponding option. Used only with an auto-completing select, where the list of items comes from either the autocompleteList or autocompleteMethod attributes.
      Specified by:
        `getItemLabel` in interface `SelectItemsProps`

    - #### getVar

          public abstract String getVar()

      Expose the values from either the autocompleteList or autocompleteMethod attributes under a request scoped key so that the values may be referred to in an EL expression while rendering this component. When using auto-completing select component this attribute is required.
      Specified by:
        `getVar` in interface `AutocompleteProps`
      Specified by:
        `getVar` in interface `SelectItemsProps`

    - #### getOnbegin

          public abstract String getOnbegin()

      The client-side script method to be called before an ajax request. (Only valid in autocomplete mode).
      Specified by:
        `getOnbegin` in interface `AutocompleteProps`

    - #### getOncomplete

          public abstract String getOncomplete()

      The client-side script method to be called after the DOM is updated. (Only valid in autocomplete mode).
      Specified by:
        `getOncomplete` in interface `AutocompleteProps`

    - #### getOnbeforedomupdate

          public abstract String getOnbeforedomupdate()

      The client-side script method to be called after the ajax response comes back, but before the DOM is updated. (Only valid in autocomplete mode).
      Specified by:
        `getOnbeforedomupdate` in interface `AutocompleteProps`

    - #### getStatus

          public abstract String getStatus()

      Name of the request status component that will indicate the status of the Ajax request. (Only valid in autocomplete mode).
      Specified by:
        `getStatus` in interface `AutocompleteProps`

    - #### validateValue

          protected void validateValue(javax.faces.context.FacesContext facesContext,
                           Object value)

      Override the validateValue method in cases where the component implements SelectItemsInterface
      Overrides:
        `validateValue` in class `javax.faces.component.UISelectOne`
      Parameters:
        `facesContext` -
        `value` -

    - #### processEvent

          public void processEvent(javax.faces.event.ComponentSystemEvent event)
                            throws javax.faces.event.AbortProcessingException

      Specified by:
        `processEvent` in interface `javax.faces.event.ComponentSystemEventListener`
      Overrides:
        `processEvent` in class `javax.faces.component.UIComponent`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### resolveClientId

          public String resolveClientId(javax.faces.context.FacesContext facesContext,
                               javax.faces.component.UIComponent contextComponent,
                               String metaComponentId)

      Description copied from interface: `MetaComponentResolver`
      Resolves and returns string identifying supported meta-component or `null` if provided meta-component name is not a supported one.
      Specified by:
        `resolveClientId` in interface `MetaComponentResolver`
      Parameters:
        `facesContext` - - current instance of `FacesContext`
        `contextComponent` - - instance of `UIComponent` that requested resolution of meta-component
        `metaComponentId` - - name of meta-component (without leading '@' sign)
      Returns:
        clientId, one of supported meta-names such as @all, @this, etc. or `null`

    - #### visitTree

          public boolean visitTree(javax.faces.component.visit.VisitContext context,
                          javax.faces.component.visit.VisitCallback callback)

      Overrides:
        `visitTree` in class `javax.faces.component.UIComponentBase`

    - #### encodeMetaComponent

          public void encodeMetaComponent(javax.faces.context.FacesContext context,
                                 String metaComponentId)
                                   throws IOException

      Specified by:
        `encodeMetaComponent` in interface `MetaComponentEncoder`
      Throws:
        `IOException`

    - #### substituteUnresolvedClientId

          public String substituteUnresolvedClientId(javax.faces.context.FacesContext facesContext,
                                            javax.faces.component.UIComponent contextComponent,
                                            String metaComponentId)

      Description copied from interface: `MetaComponentResolver`
      Provides replacement for unresolved meta-component names. Returns identifier string for the chosen substitution or `null`
      Specified by:
        `substituteUnresolvedClientId` in interface `MetaComponentResolver`
      Parameters:
        `facesContext` - - current instance of `FacesContext`
        `contextComponent` - - instance of `UIComponent` that requested resolution of meta-component
        `metaComponentId` - - name of meta-component (without leading '@' sign)
      Returns:
        clientId, one of supported meta-names such as @all, @this, etc. or `null`

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.