org.apache.myfaces.trinidad.component

## Class UIXSelectRange

- java.lang.Object
- - javax.faces.component.UIComponent
  - - org.apache.myfaces.trinidad.component.UIXComponent
    - - org.apache.myfaces.trinidad.component.UIXComponentBase
      - - org.apache.myfaces.trinidad.component.UIXSelectRange

- All Implemented Interfaces:
    EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder
  Direct Known Subclasses:
    CoreSelectRangeChoiceBar

      public class UIXSelectRange
      extends UIXComponentBase

  UIXSelectRange is a base abstraction for components that select a range, e.g, 5 - 10 of 50.

  #### Events:

  Type | Phases | Description
  --- | --- | ---
  `org.apache.myfaces.trinidad.event.RangeChangeEvent` | Any Phase Invoke Application | The range change event is delivered when the user navigates.
  `org.apache.myfaces.trinidad.event.AttributeChangeEvent` | Invoke Application Apply Request Values | Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `UIXComponentBase.ComponentSystemEventListenerWrapper`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static PropertyKey` | `FIRST_KEY`
    `static PropertyKey` | `IMMEDIATE_KEY`
    `static PropertyKey` | `RANGE_CHANGE_LISTENER_KEY`
    `static String` | `RANGE_LABEL_FACET`
    `static PropertyKey` | `ROWS_KEY`
    `static FacesBean.Type` | `TYPE`
    `static PropertyKey` | `VALUE_KEY`
    `static PropertyKey` | `VAR_KEY`

    - ### Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY`

    - ### 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`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `UIXSelectRange()` Construct an instance of the UIXSelectRange.
    `protected` | `UIXSelectRange(String rendererType)` Construct an instance of the UIXSelectRange.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRangeChangeListener(RangeChangeListener listener)` Adds a rangeChange listener.
    `void` | `broadcast(javax.faces.event.FacesEvent event)`
    `void` | `encodeBegin(javax.faces.context.FacesContext context)`
    `protected FacesBean.Type` | `getBeanType()`
    `String` | `getFamily()`
    `int` | `getFirst()` Gets the index of the first row in the currently range of rows.
    `javax.el.MethodExpression` | `getRangeChangeListener()` Gets a method reference to a rangeChange listener that will be called when a new range is selected.
    `RangeChangeListener[]` | `getRangeChangeListeners()` Returns an array of attached rangeChange listeners.
    `javax.faces.component.UIComponent` | `getRangeLabel()` use to customize the label of each range selection.
    `int` | `getRowCount()` Gets the total number of rows in this table.
    `Object` | `getRowData()` Gets the data for the current row.
    `Object` | `getRowData(int rowIndex)` Gets the data for the current row.
    `int` | `getRowIndex()`
    `int` | `getRows()` Gets the maximum number of rows to display in a single range of rows.
    `Object` | `getValue()` Gets the data model being used by this component.
    `String` | `getVar()` Gets the name of the EL variable that provides access to the "start" and "end" variables that point to the start and end row in the each range from the data model.
    `boolean` | `isImmediate()` Gets whether data validation should be skipped when range change events are generated by this component.
    `boolean` | `isRowAvailable()` Checks to see if the current row is available.
    `boolean` | `isRowAvailable(int rowIndex)` Checks to see if the given row is available.
    `void` | `queueEvent(javax.faces.event.FacesEvent e)` * We don't want to update model if we have validation errors on the page, so if not immediate, queue the event in INVOKE_APPLICATION phase.
    `void` | `removeRangeChangeListener(RangeChangeListener listener)` Removes a rangeChange listener.
    `void` | `setFirst(int first)` Sets the index of the first row in the currently range of rows.
    `void` | `setImmediate(boolean immediate)` Sets whether data validation should be skipped when range change events are generated by this component.
    `void` | `setRangeChangeListener(javax.faces.el.MethodBinding binding)` Deprecated.
    `void` | `setRangeChangeListener(javax.el.MethodExpression rangeChangeListener)` Sets a method reference to a rangeChange listener that will be called when a new range is selected.
    `void` | `setRangeLabel(javax.faces.component.UIComponent rangeLabelFacet)` use to customize the label of each range selection.
    `void` | `setRowIndex(int rowIndex)` Makes a row current.
    `void` | `setRows(int rows)` Sets the maximum number of rows to display in a single range of rows.
    `void` | `setValue(Object value)` Sets the data model being used by this component.
    `void` | `setVar(String var)` Sets the name of the EL variable that provides access to the "start" and "end" variables that point to the start and end row in the each range from the data model.

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getPassThroughAttributes, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl`

    - ### Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent

      `addPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTree`

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

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView`

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

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

- - ### Field Detail

    - #### TYPE

          public static final FacesBean.Type TYPE

    - #### VAR_KEY

          public static final PropertyKey VAR_KEY

    - #### IMMEDIATE_KEY

          public static final PropertyKey IMMEDIATE_KEY

    - #### RANGE_CHANGE_LISTENER_KEY

          public static final PropertyKey RANGE_CHANGE_LISTENER_KEY

    - #### VALUE_KEY

          public static final PropertyKey VALUE_KEY

    - #### ROWS_KEY

          public static final PropertyKey ROWS_KEY

    - #### FIRST_KEY

          public static final PropertyKey FIRST_KEY

    - #### RANGE_LABEL_FACET

          public static final String RANGE_LABEL_FACET

      See Also:
        Constant Field Values

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UIXSelectRange

          public UIXSelectRange()

      Construct an instance of the UIXSelectRange.

    - #### UIXSelectRange

          protected UIXSelectRange(String rendererType)

      Construct an instance of the UIXSelectRange.

  - ### Method Detail

    - #### setRangeChangeListener

          @Deprecated
          public void setRangeChangeListener(javax.faces.el.MethodBinding binding)

      Deprecated.

    - #### encodeBegin

          public void encodeBegin(javax.faces.context.FacesContext context)
                           throws IOException

      Overrides:
        `encodeBegin` in class `UIXComponentBase`
      Throws:
        `IOException`

    - #### broadcast

          public void broadcast(javax.faces.event.FacesEvent event)
                         throws javax.faces.event.AbortProcessingException

      Overrides:
        `broadcast` in class `UIXComponentBase`
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### queueEvent

          public void queueEvent(javax.faces.event.FacesEvent e)

      * We don't want to update model if we have validation errors on the page, so if not immediate, queue the event in INVOKE_APPLICATION phase.
      Overrides:
        `queueEvent` in class `UIXComponentBase`

    - #### setRowIndex

          public final void setRowIndex(int rowIndex)

      Makes a row current.
      Parameters:
        `rowIndex` - the zero-based row-index of the row that should be made current. Use -1 to clear the current row.
      See Also:
        `DataModel.setRowIndex(int)`

    - #### getRowIndex

          public final int getRowIndex()

      Returns:
        the zero-based row-index of the current row, or -1 if now row is current.
      See Also:
        `DataModel.getRowIndex()`

    - #### getRowCount

          public final int getRowCount()

      Gets the total number of rows in this table.
      Returns:
        -1 if the total number is not known.
      See Also:
        `DataModel.getRowCount()`

    - #### isRowAvailable

          public final boolean isRowAvailable()

      Checks to see if the current row is available. This is useful when the total number of rows is not known.
      Returns:
        true iff the current row is available.
      See Also:
        `CollectionModel.isRowAvailable(int)`

    - #### isRowAvailable

          public final boolean isRowAvailable(int rowIndex)

      Checks to see if the given row is available. This is useful when the total number of rows is not known.
      Parameters:
        `rowIndex` - identifies the row to check
      Returns:
        true iff the current row is available.
      See Also:
        `CollectionModel.isRowAvailable(int)`

    - #### getRowData

          public final Object getRowData()

      Gets the data for the current row.
      Returns:
        null if the current row is unavailable
      See Also:
        `CollectionModel.getRowData(int)`

    - #### getRowData

          public final Object getRowData(int rowIndex)

      Gets the data for the current row.
      Parameters:
        `rowIndex` - identifies the row to get data from
      Returns:
        null if the current row is unavailable
      See Also:
        `CollectionModel.getRowData(int)`

    - #### getRangeLabel

          public final javax.faces.component.UIComponent getRangeLabel()

      use to customize the label of each range selection.

    - #### setRangeLabel

          public final void setRangeLabel(javax.faces.component.UIComponent rangeLabelFacet)

      use to customize the label of each range selection.

    - #### getVar

          public final String getVar()

      Gets the name of the EL variable that provides access to the "start" and "end" variables that point to the start and end row in the each range from the data model. This can be used to customize the range text.
      Returns:
        the new var value

    - #### setVar

          public final void setVar(String var)

      Sets the name of the EL variable that provides access to the "start" and "end" variables that point to the start and end row in the each range from the data model. This can be used to customize the range text.
      Parameters:
        `var` - the new var value

    - #### isImmediate

          public final boolean isImmediate()

      Gets whether data validation should be skipped when range change events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase.
      Returns:
        the new immediate value

    - #### setImmediate

          public final void setImmediate(boolean immediate)

      Sets whether data validation should be skipped when range change events are generated by this component. When immediate is false (the default), events will be delivered during the Invoke Application phase, which will trigger validation. When set to true, events will be executed during the Apply Request Values phase.
      Parameters:
        `immediate` - the new immediate value

    - #### getRangeChangeListener

          public final javax.el.MethodExpression getRangeChangeListener()

      Gets a method reference to a rangeChange listener that will be called when a new range is selected.
      Returns:
        the new rangeChangeListener value

    - #### setRangeChangeListener

          public final void setRangeChangeListener(javax.el.MethodExpression rangeChangeListener)

      Sets a method reference to a rangeChange listener that will be called when a new range is selected.
      Parameters:
        `rangeChangeListener` - the new rangeChangeListener value

    - #### getValue

          public final Object getValue()

      Gets
      the data model being used by this component. The specific model class is `org.apache.myfaces.trinidad.model.CollectionModel`. You may also use other model instances, e.g., `java.util.List` , array, and `javax.faces.model.DataModel`. This component will automatically convert the instance into a `CollectionModel`.
      Returns:
        the new value value

    - #### setValue

          public final void setValue(Object value)

      Sets
      the data model being used by this component. The specific model class is `org.apache.myfaces.trinidad.model.CollectionModel`. You may also use other model instances, e.g., `java.util.List` , array, and `javax.faces.model.DataModel`. This component will automatically convert the instance into a `CollectionModel`.
      Parameters:
        `value` - the new value value

    - #### getRows

          public final int getRows()

      Gets the maximum number of rows to display in a single range of rows. Some ranges might have fewer than the number of rows specified by this attribute (eg: the last range might have an insufficient number of rows). To display all rows at once, set this attribute to 0.
      Returns:
        the new rows value

    - #### setRows

          public final void setRows(int rows)

      Sets the maximum number of rows to display in a single range of rows. Some ranges might have fewer than the number of rows specified by this attribute (eg: the last range might have an insufficient number of rows). To display all rows at once, set this attribute to 0.
      Parameters:
        `rows` - the new rows value

    - #### getFirst

          public final int getFirst()

      Gets the index of the first row in the currently range of rows. This index is zero-based. This attribute is used to control which range of rows to display to the user.
      Returns:
        the new first value

    - #### setFirst

          public final void setFirst(int first)

      Sets the index of the first row in the currently range of rows. This index is zero-based. This attribute is used to control which range of rows to display to the user.
      Parameters:
        `first` - the new first value

    - #### addRangeChangeListener

          public final void addRangeChangeListener(RangeChangeListener listener)

      Adds a rangeChange listener.
      Parameters:
        `listener` - the rangeChange listener to add

    - #### removeRangeChangeListener

          public final void removeRangeChangeListener(RangeChangeListener listener)

      Removes a rangeChange listener.
      Parameters:
        `listener` - the rangeChange listener to remove

    - #### getRangeChangeListeners

          public final RangeChangeListener[] getRangeChangeListeners()

      Returns an array of attached rangeChange listeners.
      Returns:
        an array of attached rangeChange listeners.

    - #### getFamily

          public String getFamily()

      Specified by:
        `getFamily` in class `UIXComponentBase`

    - #### getBeanType

          protected FacesBean.Type getBeanType()

      Overrides:
        `getBeanType` in class `UIXComponentBase`

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.