Interface UiAbstractDataTable<R>

Type Parameters:
R - type of the data for the rows displayed by this widget. Typically a Bean.
All Superinterfaces:
AttributeReadAttached, AttributeReadEnabled, AttributeReadId, AttributeReadMultiSelection, AttributeReadSelection<R>, AttributeReadSelections<R>, AttributeReadValid, AttributeReadVisible, AttributeWriteEnabled, AttributeWriteId, AttributeWriteMultiSelection, AttributeWriteReadOnly, AttributeWriteSelection<R>, AttributeWriteSelections<R>, AttributeWriteShowRowNumbers, AttributeWriteTooltip, AttributeWriteVisible, io.github.mmm.event.EventSource<UiEvent,UiEventListener>, UiAbstractDataWidget<R>, UiRegularWidget, UiWidget
All Known Subinterfaces:
UiDataTable<R>, UiDataTreeTable<R>

public interface UiAbstractDataTable<R> extends UiAbstractDataWidget<R>, AttributeWriteShowRowNumbers
Abstract interface for widgets showing complex data in columns such as UiDataTable.
Since:
1.0.0
  • Method Details

    • getColumnCount

      int getColumnCount()
      Returns:
      the number of columns of this data widget.
      See Also:
    • createColumn

      <V> UiColumn<R,V> createColumn(io.github.mmm.value.TypedPropertyPath<V> property)
      Type Parameters:
      V - type of the cell values of the UiColumn.
      Parameters:
      property - the property of the row data.
      Returns:
      the new UiColumn.
      Throws:
      RuntimeException - if the given property does not belong to the data model of this data widget.
    • createColumn

      <V> UiColumn<R,V> createColumn(String title, UiAbstractDataWidget.ColumnAdapter<R,V> adapter)
      Type Parameters:
      V - type of the cell values of the UiColumn.
      Parameters:
      title - the column header title.
      adapter - the UiAbstractDataWidget.ColumnAdapter giving access to read (and write) the column cell values from the data model.
      Returns:
      the new UiColumn.
    • getColumn

      UiColumn<R,?> getColumn(int index)
      Parameters:
      index - is the index of the requested UiColumn. The index corresponds to the index when the UiColumn has been added. Reordering or hiding columns in the UI has no effect on the index. The value has to be in the range from 0 to getColumnCount() - 1.
      Returns:
      the requested column.
      See Also:
    • addColumn

      default void addColumn(UiColumn<R,?> column)
      Parameters:
      column - the UiColumn to add. Has to be created by this data widget.
    • addColumn

      void addColumn(UiColumn<R,?> column, int index)
      Parameters:
      column - the UiColumn to add. Has to be created by this data widget.
      index - the index where to add the new column.
    • addColumn

      default <V> UiColumn<R,V> addColumn(io.github.mmm.value.TypedPropertyPath<V> property)
      Type Parameters:
      V - type of the cell values of the UiColumn.
      Parameters:
      property - the property of the row data.
      index - the index where to add the new column.
      Returns:
      the new UiColumn.
      Throws:
      RuntimeException - if the given property does not belong to the data model of this data widget.
    • addColumn

      default <V> UiColumn<R,V> addColumn(io.github.mmm.value.TypedPropertyPath<V> property, int index)
      Type Parameters:
      V - type of the cell values of the UiColumn.
      Parameters:
      property - the property of the row data.
      index - the index where to add the new column.
      Returns:
      the new UiColumn.
      Throws:
      RuntimeException - if the given property does not belong to the data model of this data widget.
    • addColumns

      default void addColumns(UiColumn<R,?>... columns)
      Parameters:
      columns - the UiColumns to add. Have to be created by this data widget.
    • sort

      void sort(io.github.mmm.base.sort.SortOrder order, UiColumn<R,?>... columns)
      This method sorts the data with the given SortOrder according to the specified UiColumns. The sort priority is from the first UiColumn (primary sort) to the last (least significant sort). In case all values of the first column are unique additional columns will have no effect on sorting.
      Parameters:
      order - is the SortOrder.
      columns - are the columns of this data-list to sort by.
    • setFilterHandler

      void setFilterHandler(UiAbstractDataTable.FilterHandler<R> filterHandler)
      Parameters:
      filterHandler - the UiAbstractDataTable.FilterHandler to customize the filtering. Allows to override the filtering for individual columns or the entire table. Custom handling may trigger a server-side search and asynchronously update the data in the table.