org.apache.myfaces.trinidad.component

## Class UIXListView

- java.lang.Object
- - javax.faces.component.UIComponent
  - - org.apache.myfaces.trinidad.component.UIXComponent
    - - org.apache.myfaces.trinidad.component.UIXComponentBase
      - - org.apache.myfaces.trinidad.component.UIXCollection
        - - org.apache.myfaces.trinidad.component.UIXIterator
          - - org.apache.myfaces.trinidad.component.UIXListView

- All Implemented Interfaces:
    EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, FlattenedComponent, LocalRowKeyIndex

      public class UIXListView
      extends UIXIterator
      implements javax.faces.component.NamingContainer

  UIXListView is a component that is similar to UIXIterator. In addition it adds support for selection and grouping. The grouping support add Tree Like functionaliy via the TreeModel class.

  #### Events:

  Type | Phases | Description
  --- | --- | ---
  `org.apache.myfaces.trinidad.event.SelectionEvent` | Apply Request Values Invoke Application | The selection event is delivered when the table selection changes.
  `org.apache.myfaces.trinidad.event.RowDisclosureEvent` | Apply Request Values Invoke Application | The expansion event is generated for a table when the detail facet of a row is expanded or collapsed. For tree or a treeTable, the expansion event is generated when tree nodes are expanded or collapsed.
  `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.UIXCollection

      `UIXCollection.NoColumnFacetsVisitContext`

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

      `UIXComponentBase.ComponentSystemEventListenerWrapper`

    - ### Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex

      `LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`
    `static PropertyKey` | `GROUP_DISCLOSED_ROW_KEYS_KEY`
    `static PropertyKey` | `GROUP_DISCLOSURE_LISTENER_KEY`
    `static PropertyKey` | `SELECTED_ROW_KEYS_KEY`
    `static PropertyKey` | `SELECTION_LISTENER_KEY`
    `static FacesBean.Type` | `TYPE`

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

      `FIRST_KEY, ROWS_KEY, VALUE_KEY, VAR_STATUS_KEY`

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

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

    - ### Fields inherited from interface javax.faces.component.NamingContainer

      `SEPARATOR_CHAR`

  - ### Constructor Summary

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

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRowDisclosureListener(RowDisclosureListener listener)` Adds a rowDisclosure listener.
    `void` | `addSelectionListener(SelectionListener listener)` Adds a selection listener.
    `void` | `broadcast(javax.faces.event.FacesEvent event)` Delivers a wrapped event to the appropriate component.
    `protected FacesBean` | `createFacesBean(String rendererType)`
    `void` | `enterContainer()` Treats the current element as a parent element and steps into the children.
    `void` | `exitContainer()` Changes the rowData to be the parent rowData.
    `List<Object>` | `getAllAncestorContainerRowKeys(Object childRowKey)` Gets the all the rowKeys of the ancestors of the given child row.
    `protected FacesBean.Type` | `getBeanType()`
    `Object` | `getContainerRowKey()` Gets the rowKey of the current row's container.
    `Object` | `getContainerRowKey(Object childKey)` Gets the rowKey of the given row's container.
    `int` | `getDepth()` Gets the depth of the current row in this tree hierarchy
    `int` | `getDepth(Object rowKey)` Gets the depth of the current row in this tree hierarchy
    `String` | `getFamily()`
    `RowKeySet` | `getGroupDisclosedRowKeys()` Gets the set of disclosed groups for this component.
    `javax.el.MethodExpression` | `getGroupDisclosureListener()` Gets a method reference to a group disclosure listener
    `RowDisclosureListener[]` | `getRowDisclosureListeners()` Returns an array of attached rowDisclosure listeners.
    `RowKeySet` | `getSelectedRowKeys()` Gets the selection state for this component.
    `javax.el.MethodExpression` | `getSelectionListener()` Gets a method reference to a selection listener
    `SelectionListener[]` | `getSelectionListeners()` Returns an array of attached selection listeners.
    `boolean` | `isContainer()` Checks to see if the current element is a container of other elements.
    `boolean` | `isContainerEmpty()` Checks to see if the container is empty.
    `protected void` | `postCreateCollectionModel(CollectionModel model)` Hook called with the result of `createCollectionModel`.
    `void` | `queueEvent(javax.faces.event.FacesEvent event)` Sets the phaseID of UI events depending on the "immediate" property.
    `void` | `removeRowDisclosureListener(RowDisclosureListener listener)` Removes a rowDisclosure listener.
    `void` | `removeSelectionListener(SelectionListener listener)` Removes a selection listener.
    `void` | `setGroupDisclosedRowKeys(RowKeySet groupDisclosedRowKeys)` Sets the set of disclosed groups for this component.
    `void` | `setGroupDisclosureListener(javax.el.MethodExpression groupDisclosureListener)` Sets a method reference to a group disclosure listener
    `void` | `setSelectedRowKeys(RowKeySet selectedRowKeys)` Sets the selection state for this component.
    `void` | `setSelectionListener(javax.el.MethodExpression selectionListener)` Sets a method reference to a selection listener

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

      `createCollectionModel, createVarStatusMap, encodeChildren, getFirst, getRendersChildren, getRows, getValue, getVarStatus, isFlatteningChildren, processFacetsAndChildren, processFlattenedChildren, setFirst, setRows, setValue, setVarStatus, visitData`

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

      `areRowsAvailable, areRowsAvailable, areRowsAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearCurrencyStringCache, clearLocalCache, decodeChildrenImpl, defaultVisitChildren, encodeBegin, encodeEnd, ensureRowsAvailable, getCachingStrategy, getClientRowKey, getClientRowKeyManager, getCollectionModel, getCollectionModel, getContainerClientId, getCurrencyString, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowCount, getRowData, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, getStamps, getVar, invokeOnComponent, isRowAvailable, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, isSortable, postRowDataChange, preRowDataChange, processComponent, processDecodes, processEvent, processFlattenedChildrenBegin, processRestoreState, processSaveState, processUpdates, processValidators, resetStampState, restoreStampState, restoreState, saveStampState, saveState, setClientRowKey, setCurrencyString, setRowIndex, setRowKey, setSortCriteria, setupELVariable, setupVisitingContext, setVar, tearDownVisitingContext, updateChildrenImpl, validateChildrenImpl, visitChildren, visitChildrenWithoutIterating, visitUnstampedFacets`

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

      `adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, decode, decodeChildren, 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, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, satisfiesPartialTrigger, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, validateChildren`

    - ### 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, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, visitAllChildren, visitChildren, visitTree, visitTree`

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

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

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

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

    - ### Methods inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex

      `areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, isRowLocallyAvailable, isRowLocallyAvailable`

- - ### Field Detail

    - #### TYPE

          public static final FacesBean.Type TYPE

    - #### SELECTED_ROW_KEYS_KEY

          public static final PropertyKey SELECTED_ROW_KEYS_KEY

    - #### GROUP_DISCLOSED_ROW_KEYS_KEY

          public static final PropertyKey GROUP_DISCLOSED_ROW_KEYS_KEY

    - #### SELECTION_LISTENER_KEY

          public static final PropertyKey SELECTION_LISTENER_KEY

    - #### GROUP_DISCLOSURE_LISTENER_KEY

          public static final PropertyKey GROUP_DISCLOSURE_LISTENER_KEY

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

    - #### UIXListView

          public UIXListView()

      Construct an instance of the UIXListView.

    - #### UIXListView

          protected UIXListView(String rendererType)

      Construct an instance of the UIXListView.

  - ### Method Detail

    - #### queueEvent

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

      Sets the phaseID of UI events depending on the "immediate" property.
      Overrides:
        `queueEvent` in class `UIXCollection`
      Parameters:
        `event` - a FacesEvent

    - #### broadcast

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

      Delivers a wrapped event to the appropriate component. If the event is a special wrapped event, it is unwrapped. Overridden to handle broadcast of the selection and the row disclosure events
      Overrides:
        `broadcast` in class `UIXCollection`
      Parameters:
        `event` - a FacesEvent
      Throws:
        `javax.faces.event.AbortProcessingException`

    - #### postCreateCollectionModel

          protected void postCreateCollectionModel(CollectionModel model)

      Description copied from class: `UIXCollection`
      Hook called with the result of `createCollectionModel`. Subclasses can use this method to perform initialization after the CollectionModel is fully initialized. Subclassers should call super before accessing any component state to ensure that superclass initialization has been performed.
      Overrides:
        `postCreateCollectionModel` in class `UIXCollection`
      Parameters:
        `model` - The model instance returned by``
      See Also:
        `UIXCollection.createCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel, java.lang.Object)`

    - #### createFacesBean

          protected FacesBean createFacesBean(String rendererType)

      Overrides:
        `createFacesBean` in class `UIXComponentBase`

    - #### enterContainer

          public final void enterContainer()

      Treats the current element as a parent element and steps into the children. A new path is constructed by appending the null value to the old path. The rowData becomes null. It is legal to call this method only if `isContainer()` returns true.
      See Also:
        `TreeModel.enterContainer()`

    - #### exitContainer

          public final void exitContainer()

      Changes the rowData to be the parent rowData. A new path is constructed by removing the last rowKey from the old path. The element that is identified by the new path is made current.
      See Also:
        `TreeModel.exitContainer()`

    - #### isContainer

          public final boolean isContainer()

      Checks to see if the current element is a container of other elements.
      Returns:
        true if the current element contains other elements.
      See Also:
        `TreeModel.isContainer()`

    - #### isContainerEmpty

          public boolean isContainerEmpty()

      Checks to see if the container is empty.
      Returns:
        true if the current container element has no children.
      See Also:
        `TreeModel.isContainerEmpty()`

    - #### getDepth

          public int getDepth()

      Gets the depth of the current row in this tree hierarchy
      Returns:
        zero for any root rows.
      See Also:
        `TreeModel.getDepth()`

    - #### getDepth

          public int getDepth(Object rowKey)

      Gets the depth of the current row in this tree hierarchy
      Returns:
        zero for any root rows.
      See Also:
        `TreeModel.getDepth(Object)`

    - #### getContainerRowKey

          public Object getContainerRowKey()

      Gets the rowKey of the current row's container.
      See Also:
        `TreeModel.getContainerRowKey()`

    - #### getContainerRowKey

          public Object getContainerRowKey(Object childKey)

      Gets the rowKey of the given row's container.
      See Also:
        `TreeModel.getContainerRowKey(Object)`

    - #### getAllAncestorContainerRowKeys

          public List<Object> getAllAncestorContainerRowKeys(Object childRowKey)

      Gets the all the rowKeys of the ancestors of the given child row.
      See Also:
        `TreeModel.getAllAncestorContainerRowKeys(Object)`

    - #### getSelectedRowKeys

          public final RowKeySet getSelectedRowKeys()

      Gets the selection state for this component.
      Returns:
        the new selectedRowKeys value

    - #### setSelectedRowKeys

          public final void setSelectedRowKeys(RowKeySet selectedRowKeys)

      Sets the selection state for this component.
      Parameters:
        `selectedRowKeys` - the new selectedRowKeys value

    - #### getGroupDisclosedRowKeys

          public final RowKeySet getGroupDisclosedRowKeys()

      Gets the set of disclosed groups for this component. Each entry in the set is a rowKey.
      Returns:
        the new groupDisclosedRowKeys value

    - #### setGroupDisclosedRowKeys

          public final void setGroupDisclosedRowKeys(RowKeySet groupDisclosedRowKeys)

      Sets the set of disclosed groups for this component. Each entry in the set is a rowKey.
      Parameters:
        `groupDisclosedRowKeys` - the new groupDisclosedRowKeys value

    - #### getSelectionListener

          public final javax.el.MethodExpression getSelectionListener()

      Gets a method reference to a selection listener
      Returns:
        the new selectionListener value

    - #### setSelectionListener

          public final void setSelectionListener(javax.el.MethodExpression selectionListener)

      Sets a method reference to a selection listener
      Parameters:
        `selectionListener` - the new selectionListener value

    - #### getGroupDisclosureListener

          public final javax.el.MethodExpression getGroupDisclosureListener()

      Gets a method reference to a group disclosure listener
      Returns:
        the new groupDisclosureListener value

    - #### setGroupDisclosureListener

          public final void setGroupDisclosureListener(javax.el.MethodExpression groupDisclosureListener)

      Sets a method reference to a group disclosure listener
      Parameters:
        `groupDisclosureListener` - the new groupDisclosureListener value

    - #### addSelectionListener

          public final void addSelectionListener(SelectionListener listener)

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

    - #### removeSelectionListener

          public final void removeSelectionListener(SelectionListener listener)

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

    - #### getSelectionListeners

          public final SelectionListener[] getSelectionListeners()

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

    - #### addRowDisclosureListener

          public final void addRowDisclosureListener(RowDisclosureListener listener)

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

    - #### removeRowDisclosureListener

          public final void removeRowDisclosureListener(RowDisclosureListener listener)

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

    - #### getRowDisclosureListeners

          public final RowDisclosureListener[] getRowDisclosureListeners()

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

    - #### getFamily

          public String getFamily()

      Overrides:
        `getFamily` in class `UIXIterator`

    - #### getBeanType

          protected FacesBean.Type getBeanType()

      Overrides:
        `getBeanType` in class `UIXIterator`

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