Interface GroupTable<E>

Type Parameters:
E - row item type
All Superinterfaces:
ActionsHolder, Component, Component.BelongToFrame, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, HasButtonsPanel, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasMinSize, HasPagination, HasSubParts, HasTablePresentations, ListComponent<E>, LookupComponent<E>, Table<E>
All Known Implementing Classes:
GroupTableImpl

@StudioComponent(caption="GroupTable", category="Components", xmlElement="groupTable", icon="io/jmix/ui/icon/component/groupTable.svg", canvasBehaviour=TABLE, documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/group-table.html") public interface GroupTable<E> extends Table<E>
Table UI component that supports grouping of rows by property values.
  • Field Details

  • Method Details

    • of

      static <T> org.springframework.core.ParameterizedTypeReference<GroupTable<T>> of(Class<T> itemClass)
    • getColumns

      @StudioElementsGroup(xmlElement="group", caption="Group", icon="io/jmix/ui/icon/element/group.svg", elementXmlName="column") List<Table.Column<E>> getColumns()
      Description copied from interface: Table
      Returns a copy of currently configured columns in their current visual order in this Table.
      Specified by:
      getColumns in interface Table<E>
      Returns:
      unmodifiable copy of current columns
      See Also:
    • groupBy

      void groupBy(Object[] properties)
      Performs grouping by the given properties.
      Parameters:
      properties - an array of MetaPropertyPath
    • groupByColumns

      void groupByColumns(String... columnIds)
      Performs grouping by the given ids of table columns.
      Parameters:
      columnIds - column ids
    • ungroupByColumns

      void ungroupByColumns(String... columnIds)
      Resets grouping by the given ids of table columns.
      Parameters:
      columnIds - column ids
    • ungroup

      void ungroup()
      Resets grouping at all.
    • getGroupCellValueFormatter

      GroupTable.GroupCellValueFormatter<E> getGroupCellValueFormatter()
    • setGroupCellValueFormatter

      void setGroupCellValueFormatter(GroupTable.GroupCellValueFormatter<E> formatter)
    • expandAll

      void expandAll()
    • expand

      void expand(GroupInfo groupId)
    • expandPath

      void expandPath(Object item)
      Expand all groups for specified item.
    • collapseAll

      void collapseAll()
    • collapse

      void collapse(GroupInfo groupId)
    • isExpanded

      boolean isExpanded(GroupInfo groupId)
    • isFixedGrouping

      boolean isFixedGrouping()
    • setFixedGrouping

      @StudioProperty(defaultValue="false") void setFixedGrouping(boolean fixedGrouping)
    • isShowItemsCountForGroup

      boolean isShowItemsCountForGroup()
      Returns:
      true if GroupTable shows items count for group
    • setShowItemsCountForGroup

      void setShowItemsCountForGroup(boolean showItemsCountForGroup)
      Show or hide items count for GroupTable groups.
      Default value is true.
    • getAggregationResults

      Map<Object,Object> getAggregationResults(GroupInfo info)
      Returns a map with aggregation results for the given group info instance, where keys are table column ids and values are aggregation value.
      Parameters:
      info - the group info instance
      Returns:
      aggregation results for the given group info instance
    • isSortOnGroupEnabled

      boolean isSortOnGroupEnabled()
      Returns:
      true if automatic sorting on grouping columns is enabled
      See Also:
    • setSortOnGroupEnabled

      @StudioProperty void setSortOnGroupEnabled(boolean sortOnGroupEnabled)
      Enable/disable automatic sorting on grouping columns when collection of grouping columns is changed (reorder, add or remove grouping columns)
      Parameters:
      sortOnGroupEnabled - flag whether sorting should be performed when grouping columns are changed.