Class DataTable

java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
All Implemented Interfaces:
EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, ColumnAware, MultiViewStateAware<DataTableState>, Pageable, PrimeClientBehaviorHolder, RTLAware, TouchAware, UITable<DataTableState>, Widget

public class DataTable extends DataTableBase
  • Field Details

  • Constructor Details

    • DataTable

      public DataTable()
  • Method Details

    • shouldEncodeFeature

      public boolean shouldEncodeFeature(javax.faces.context.FacesContext context)
    • isFullUpdateRequest

      public boolean isFullUpdateRequest(javax.faces.context.FacesContext context)
    • isRowEditRequest

      public boolean isRowEditRequest(javax.faces.context.FacesContext context)
    • isRowEditInitRequest

      public boolean isRowEditInitRequest(javax.faces.context.FacesContext context)
    • isCellEditCancelRequest

      public boolean isCellEditCancelRequest(javax.faces.context.FacesContext context)
    • isCellEditInitRequest

      public boolean isCellEditInitRequest(javax.faces.context.FacesContext context)
    • isClientCacheRequest

      public boolean isClientCacheRequest(javax.faces.context.FacesContext context)
    • isPageStateRequest

      public boolean isPageStateRequest(javax.faces.context.FacesContext context)
    • isScrollingRequest

      public boolean isScrollingRequest(javax.faces.context.FacesContext context)
    • isRowEditCancelRequest

      public boolean isRowEditCancelRequest(javax.faces.context.FacesContext context)
    • hasSelectionColumn

      public boolean hasSelectionColumn()
    • isSelectionEnabled

      public boolean isSelectionEnabled()
    • isSingleSelectionMode

      public boolean isSingleSelectionMode()
    • 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
    • processValidators

      public void processValidators(javax.faces.context.FacesContext context)
      Description copied from class: UIDataPatch

      Override the default UIComponentBase.processValidators(javax.faces.context.FacesContext) processing to perform the following steps.

      • If the rendered property of this UIComponent is false, skip further processing.
      • Set the current rowIndex to -1.
      • Call the processValidators() method of all facets of this UIData, in the order determined by a call to getFacets().keySet().iterator().
      • Call the processValidators() method of all facets of the UIColumn children of this UIData.
      • Iterate over the set of rows that were included when this component was rendered (i.e. those defined by the first and rows properties), performing the following processing for each row:
        • Set the current rowIndex to the appropriate value for this row.
        • If isRowAvailable() returns true, iterate over the children components of each UIColumn child of this UIData component, calling the processValidators() method for each such child.
      • Set the current rowIndex to -1.
      Overrides:
      processValidators in class UIDataPatch
      Parameters:
      context - FacesContext for the current request
      See Also:
      • PreValidateEvent
      • PostValidateEvent
    • processUpdates

      public void processUpdates(javax.faces.context.FacesContext context)
      Description copied from class: UIDataPatch

      Override the default UIComponentBase.processUpdates(javax.faces.context.FacesContext) processing to perform the following steps.

      • If the rendered property of this UIComponent is false, skip further processing.
      • Set the current rowIndex to -1.
      • Call the processUpdates() method of all facets of this UIData, in the order determined by a call to getFacets().keySet().iterator().
      • Call the processUpdates() method of all facets of the UIColumn children of this UIData.
      • Iterate over the set of rows that were included when this component was rendered (i.e. those defined by the first and rows properties), performing the following processing for each row:
        • Set the current rowIndex to the appropriate value for this row.
        • If isRowAvailable() returns true, iterate over the children components of each UIColumn child of this UIData component, calling the processUpdates() method for each such child.
      • Set the current rowIndex to -1.
      Overrides:
      processUpdates in class UIDataPatch
      Parameters:
      context - FacesContext for the current request
    • queueEvent

      public void queueEvent(javax.faces.event.FacesEvent event)
      Description copied from class: UIDataPatch

      Override the default UIComponentBase.queueEvent(javax.faces.event.FacesEvent) processing to wrap any queued events in a wrapper so that we can reset the current row index in broadcast().

      Overrides:
      queueEvent in class UIDataPatch
      Parameters:
      event - FacesEvent to be queued
    • loadLazyDataIfRequired

      public void loadLazyDataIfRequired()
    • loadLazyDataIfEnabled

      public boolean loadLazyDataIfEnabled()
    • loadLazyScrollData

      public void loadLazyScrollData(int offset, int rows)
    • getScrollOffset

      public int getScrollOffset()
    • setScrollOffset

      public void setScrollOffset(int scrollOffset)
    • isReset

      public boolean isReset()
    • resetValue

      public void resetValue()
    • reset

      public void reset()
    • getRowExpansion

      public RowExpansion getRowExpansion()
    • getBehaviorEventMapping

      public Map<String,Class<? extends javax.faces.event.BehaviorEvent>> getBehaviorEventMapping()
    • getEventNames

      public Collection<String> getEventNames()
      Specified by:
      getEventNames in interface javax.faces.component.behavior.ClientBehaviorHolder
      Overrides:
      getEventNames in class javax.faces.component.UIComponentBase
    • getSubTable

      public SubTable getSubTable()
    • getRowKey

      public String getRowKey(Object object)
    • getRowData

      public Object getRowData(String rowKey)
    • getExpandedRowKeys

      public Set<String> getExpandedRowKeys()
    • setExpandedRowKeys

      public void setExpandedRowKeys(Set<String> expandedRowKeys)
    • getSelectedRowKeys

      public Set<String> getSelectedRowKeys()
    • setSelectedRowKeys

      public void setSelectedRowKeys(Set<String> selectedRowKeys)
    • getSelectedRowKeysAsString

      public String getSelectedRowKeysAsString()
    • isSelectAll

      public boolean isSelectAll()
    • setSelectAll

      public void setSelectAll(boolean selectAll)
    • getSummaryRows

      public List<SummaryRow> getSummaryRows()
    • getHeaderRow

      public HeaderRow getHeaderRow()
    • getColumns

      public List<UIColumn> getColumns()
    • setColumns

      public void setColumns(List<UIColumn> columns)
    • getScrollState

      public String getScrollState()
    • shouldSkipChildren

      protected boolean shouldSkipChildren(javax.faces.context.FacesContext context)
      Overrides:
      shouldSkipChildren in class PrimeUIData
    • isMultiSort

      public boolean isMultiSort()
    • resolveSelectionMode

      public String resolveSelectionMode()
    • requiresColumns

      protected boolean requiresColumns()
      Overrides:
      requiresColumns in class PrimeUIData
    • processColumnFacets

      protected void processColumnFacets(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
      Overrides:
      processColumnFacets in class PrimeUIData
    • visitRows

      protected boolean visitRows(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback, boolean visitRows)
      Overrides:
      visitRows in class PrimeUIData
    • processChildren

      protected void processChildren(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
      Overrides:
      processChildren in class PrimeUIData
    • resolveDataLocale

      public Locale resolveDataLocale()
    • getIterableChildren

      protected List<javax.faces.component.UIComponent> getIterableChildren()
      Overrides:
      getIterableChildren in class PrimeUIData
    • getFilteredValue

      public List<?> getFilteredValue()
    • setFilteredValue

      public void setFilteredValue(List<?> filteredValue)
    • saveState

      public Object saveState(javax.faces.context.FacesContext context)
      Specified by:
      saveState in interface javax.faces.component.StateHolder
      Overrides:
      saveState in class UIDataPatch
    • restoreMultiViewState

      public void restoreMultiViewState()
    • updateSelectionWithMVS

      public void updateSelectionWithMVS(Set<String> rowKeys)
    • updateExpansionWithMVS

      public void updateExpansionWithMVS(Set<String> rowKeys)
    • getMultiViewState

      public DataTableState getMultiViewState(boolean create)
    • resetMultiViewState

      public void resetMultiViewState()
    • getGroupedColumnIndexes

      public String getGroupedColumnIndexes()
    • getSortByAsMap

      public Map<String,SortMeta> getSortByAsMap()
    • setSortByAsMap

      public void setSortByAsMap(Map<String,SortMeta> sortBy)
    • getFilterByAsMap

      public Map<String,FilterMeta> getFilterByAsMap()
    • setFilterByAsMap

      public void setFilterByAsMap(Map<String,FilterMeta> filterBy)
    • getFrozenColumnsCount

      public int getFrozenColumnsCount()
    • isFilterByAsMapDefined

      public boolean isFilterByAsMapDefined()
    • getColumnMeta

      public Map<String,ColumnMeta> getColumnMeta()
    • setColumnMeta

      public void setColumnMeta(Map<String,ColumnMeta> columnMeta)
    • getWidth

      public String getWidth()
    • setWidth

      public void setWidth(String width)
    • filterAndSort

      public void filterAndSort()
      Recalculates filteredValue after adding, updating or removing rows to/from a filtered DataTable. NOTE: this is only supported for non-lazy DataTables, eg bound to a java.util.List.
    • selectRow

      public void selectRow(String rowKey)
    • unselectRow

      public void unselectRow(String rowKey)
    • expandRow

      public void expandRow(String rowKey)
    • collapseRow

      public void collapseRow(String rowKey)
    • getLazyDataModel

      public LazyDataModel<Object> getLazyDataModel()
    • convertIntoObjectValueType

      public static Object convertIntoObjectValueType(javax.faces.context.FacesContext context, DataTable table, List<?> value)
    • isCacheableColumns

      protected boolean isCacheableColumns(List<UIColumn> columns)