Package io.jmix.ui.component.impl
Class GroupTableImpl<E>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractActionsHolderComponent<T>
io.jmix.ui.component.impl.AbstractTable<JmixGroupTable,E>
io.jmix.ui.component.impl.GroupTableImpl<E>
- All Implemented Interfaces:
ActionsHolder
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,GroupTable<E>
,HasButtonsPanel
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasInnerComponents
,HasMinSize
,HasPagination
,HasSubParts
,HasTablePresentations
,ListComponent<E>
,LookupComponent<E>
,LookupComponent.LookupSelectionChangeNotifier<E>
,SecuredActionsHolder
,Table<E>
,TableItemsEventsDelegate<E>
,InstallTargetHandler
,org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
protected static class
protected static class
protected class
Nested classes/interfaces inherited from class io.jmix.ui.component.impl.AbstractTable
AbstractTable.AggregatableSortableDataContainer<I>, AbstractTable.AggregatableTableDataContainer<I>, AbstractTable.ColumnImpl<E>, AbstractTable.InstalledStyleProvider, AbstractTable.ItemDescriptionGenerator, AbstractTable.StyleGeneratorAdapter
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.GroupTable
GroupTable.GroupAggregationDistributionContext<V>, GroupTable.GroupCellContext<E>, GroupTable.GroupCellValueFormatter<E>, GroupTable.GroupColumn<E>, GroupTable.GroupStyleProvider<E>
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.LookupComponent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>
Nested classes/interfaces inherited from interface io.jmix.ui.component.Table
Table.AggregationDistributionContext<E>, Table.AggregationDistributionProvider<E>, Table.AggregationStyle, Table.Column<E>, Table.ColumnAlignment, Table.ColumnCollapseEvent<E>, Table.ColumnGenerator<E>, Table.ColumnReorderEvent<E>, Table.EmptyStateClickEvent<E>, Table.PlainTextCell, Table.Printable<E,
P>, Table.PrintableColumnGenerator<E, P>, Table.RowHeaderMode, Table.SelectionEvent<E>, Table.SortDirection, Table.SortInfo, Table.StyleProvider<E> -
Field Summary
Modifier and TypeFieldDescriptionprotected Map<Table.Column,
GroupTableImpl.GroupAggregationCells> protected GroupTable.GroupCellValueFormatter<E>
protected boolean
protected boolean
Fields inherited from class io.jmix.ui.component.impl.AbstractTable
accessManager, actions, aggregatableDelegate, aggregationCells, aggregations, BOOLEAN_CELL_STYLE_FALSE, BOOLEAN_CELL_STYLE_TRUE, buttonsPanel, columnCollapseListener, columns, columnsOrder, componentComposition, componentProperties, CUSTOM_STYLE_NAME_PREFIX, dataBinding, dataComponents, datatypeRegistry, defaultTableSettings, distributionProvider, EDIT_ACTION_ID, editable, emptyStateClickLinkHandler, enterPressAction, entityStates, fieldDatasources, HAS_TOP_PANEL_STYLENAME, iconProvider, iconResolver, ignoreUnfetchedAttributes, internalStyles, itemClickAction, itemDescriptionProvider, locale, MAX_TEXT_LENGTH_GAP, messages, messageTools, metadata, metadataTools, pagination, presentations, printables, requiredColumns, ROW_HEADER_PROPERTY_ID, settingsRegistry, sortable, styleProviders, topPanel, uiComponentsGenerator, uiTestIdsSupport, userSettingsTools, VALUE_PROVIDER_GENERATOR, VIEW_ACTION_ID, viewRepository, VOID_COLUMN_GENERATOR
Fields inherited from class io.jmix.ui.component.impl.AbstractActionsHolderComponent
actionButtons, actionList, actionPropertyChangeListener, actionsPermissions, contextMenuPopup, shortcutsDelegate, showIconsForPopupMenuActions
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.GroupTable
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription__handleAggregationResults
(AggregationContainer.Context context, Map<Object, Object> results) void
void
protected void
collectItemIds
(GroupInfo groupId, List<Object> itemIds) collectPropertiesByColumns
(String... columnIds) protected AbstractTable.ColumnImpl<E>
createColumn
(Object id, AbstractTable<?, E> owner) protected JmixGroupTable
protected TableDataContainer<E>
createTableDataContainer
(TableItems<E> tableItems) protected boolean
void
void
protected void
expandGroupsFor
(Collection<GroupInfo> groupSlice, Object itemId) void
expandPath
(Object item) Expand all groups for specified item.protected String
formatAggregatableGroupPropertyValue
(GroupInfo<MetaPropertyPath> groupId, Object value) protected String
formatGroupPropertyValue
(GroupInfo<MetaPropertyPath> groupId, Object value) Returns a map with aggregation results for the given group info instance, where keys are table column ids and values are aggregation value.getAllItemIds
(GroupTableItems<E> tableSource) protected Table.Column
getColumnNN
(String columnId) protected String
getGeneratedCellStyle
(Object itemId, Object propertyId) protected Object[]
getNewColumnOrder
(Object[] newGroupProperties) protected ComponentSettingsBinder
void
Performs grouping by the givenproperties
.void
groupByColumns
(String... columnIds) Performs grouping by the given ids of table columns.protected void
initComponent
(JmixGroupTable component) boolean
isExpanded
(GroupInfo groupId) boolean
boolean
void
Marks all the items in the current data source as selected.void
setAggregationDistributionProvider
(Table.AggregationDistributionProvider<E> distributionProvider) Sets aggregation distribution provider to handle distribution of data on rows.void
setFixedGrouping
(boolean fixedGrouping) void
void
setItems
(TableItems<E> tableItems) Sets an instance ofTableItems
as the Table data source.void
setShowItemsCountForGroup
(boolean showItemsCountForGroup) Show or hide items count for GroupTable groups.void
ungroup()
Resets grouping at all.void
ungroupByColumns
(String... columnIds) Resets grouping by the given ids of table columns.protected boolean
uselessGrouping
(Object[] newGroupProperties) protected void
validateProperties
(Object[] properties) Methods inherited from class io.jmix.ui.component.impl.AbstractTable
__aggregate, __aggregateValues, addAggregationCell, addColumn, addColumn, addColumn, addColumn, addColumnCollapseListener, addColumnInternal, addColumnReorderListener, addGeneratedColumn, addGeneratedColumn, addGeneratedColumn, addGeneratedColumnInternal, addLookupValueChangeListener, addPrintable, addSelectionListener, addStyleProvider, afterPropertiesSet, applyPresentation, applyPresentation, applyPresentationAsDefault, applyPresentationSettings, attachAction, attached, beforeComponentPaint, beforeContextMenuButtonHandlerPerformed, canBeSorted, checkAggregation, clearFieldDatasources, convertAggregationKeyMapToColumnIdKeyMap, createColumns, createContextMenuButton, createFieldFactory, createInstallHandler, createLinkCellClickListener, createStubsForGeneratedColumns, createStyleGenerator, createTablePresentations, createTablePresentationsLayout, createTopPanel, detached, disableEditableColumns, distributeAggregation, enableEditableColumns, fireSelectionEvent, focus, formatCellValue, generateCellDescription, generateCellStyle, generateClickableCellStyles, generateDefaultCellStyle, getAggregatableDelegate, getAggregationDistributionProvider, getAggregationInfos, getAggregationResults, getAggregationStyle, getAutowiredProperties, getButtonsPanel, getCaption, getColumn, getColumnCaption, getColumnCaption, getColumnControlVisible, getColumnReorderingAllowed, getColumns, getColumnsInternal, getColumnsOrderInternal, getColumnType, getComposition, getDefaultPresentationId, getDefaultSettings, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterAction, getEnterPressAction, getFormattedValue, getInitialVisibleColumnIds, getInnerComponents, getInstanceContainer, getItemClickAction, getItemDescriptionProvider, getItemIcon, getItems, getLookupSelectedItems, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getNotCollapsedColumns, getPagination, getParsedAggregationValue, getPresentations, getPrintable, getPrintable, getPropertyColumns, getRequiredColumnsInternal, getRowHeaderWidth, getSelected, getSelectedItemIds, getSettingsFromPresentation, getSingleSelected, getSortInfo, getStyleName, getTabIndex, getValueExIgnoreUnfetched, handleAggregation, handleClickAction, handleColumnCollapsed, handlePresentationVariables, handleSpecificVariables, initEmptyState, internalRemoveColumnCollapseListener, isAggregatable, isCaptionAsHtml, isColumnHeaderVisible, isContextMenuEnabled, isEditable, isMultiLineCells, isMultiSelect, isSettingsAvailable, isShowSelection, isShowTotalAggregation, isSortable, isTextSelectionEnabled, isValueGeneratedColumn, loadPresentations, needUpdatePresentation, onAfterUnregisterComponent, onBeforeRefreshRowCache, onColumnCollapseStateChange, onColumnReorder, refreshActionsState, removeAggregationCell, removeAllClickListeners, removeColumn, removeGeneratedColumn, removeGeneratedColumnInternal, removePrintable, removeStyleProvider, repaint, requestFocus, resetPresentation, scrollTo, setAccessManager, setActions, setAggregatable, setAggregations, setAggregationStyle, setButtonsPanel, setCaption, setCaptionAsHtml, setClientCaching, setColumnAggregationDescriptionByType, setColumnControlVisible, setColumnHeader, setColumnHeaderVisible, setColumnReorderingAllowed, setContextMenuEnabled, setCurrentAuthentication, setDataComponents, setDatatypeRegistry, setDebugId, setDefaultSettings, setEditable, setEditableColumns, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setEntityStates, setIconProvider, setIconResolver, setId, setItemClickAction, setItemDescriptionProvider, setLookupSelectHandler, setMessages, setMessageTools, setMetadata, setMetadataTools, setMinHeight, setMinWidth, setMultiLineCells, setMultiSelect, setPagination, setRequired, setRowHeaderMode, setRowHeaderWidth, setSelected, setSelected, setSelectedIds, setSettingsRegistry, setShowSelection, setShowTotalAggregation, setSortable, setStyleName, setStyleProvider, setTabIndex, setTablePresentationsLayout, setTextSelectionEnabled, setUiComponentProperties, setUiComponentsGenerator, setUiTestId, setUiTestIdsSupport, setupAutowiredColumns, setupColumnSettings, setupPaginationDataSourceProvider, setUserSettingsTools, setViewRepository, setVisibleColumns, showCustomPopup, showCustomPopupActions, showEmptyStateIfPossible, showParseErrorNotification, sort, tableSelectionChanged, tableSourceItemSetChanged, tableSourcePropertyValueChanged, tableSourceSelectedItemChanged, tableSourceStateChanged, updateCompositionStylesTopPanelVisible, updatePresentationSettings
Methods inherited from class io.jmix.ui.component.impl.AbstractActionsHolderComponent
actionPropertyChanged, addAction, addAction, createContextMenuPopup, createShortcutsDelegate, getAction, getActions, getActionsPermissions, initContextMenuButton, initContextMenuPopup, removeAction, removeAction, removeAllActions, setContextMenuButtonAction, setContextMenuButtonCaption, setContextMenuButtonIcon, setThemeConstantsManager
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setParent, setResponsive, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, removeAction, removeAction, removeAllActions
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.GroupTable
getColumns
Methods inherited from interface io.jmix.ui.component.HasButtonsPanel
getButtonsPanel, setButtonsPanel
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasPagination
getPagination, setPagination
Methods inherited from interface io.jmix.ui.component.HasTablePresentations
applyPresentation, applyPresentationAsDefault, getDefaultPresentationId, getDefaultSettings, getPresentations, loadPresentations, resetPresentation, setDefaultSettings
Methods inherited from interface io.jmix.ui.component.ListComponent
getSelected, getSingleSelected, isMultiSelect, setSelected, setSelected
Methods inherited from interface io.jmix.ui.component.LookupComponent
getLookupSelectedItems, setLookupSelectHandler
Methods inherited from interface io.jmix.ui.component.Table
addColumn, addColumn, addColumn, addColumn, addColumnCollapseListener, addColumnReorderListener, addGeneratedColumn, addGeneratedColumn, addGeneratedColumn, addPrintable, addSelectionListener, addStyleProvider, getAggregationDistributionProvider, getAggregationResults, getAggregationStyle, getColumn, getColumnControlVisible, getColumnReorderingAllowed, getEmptyStateLinkClickHandler, getEmptyStateLinkMessage, getEmptyStateMessage, getEnterPressAction, getInstanceContainer, getItemClickAction, getItemDescriptionProvider, getItems, getMinHeight, getMinHeightSizeUnit, getMinWidth, getMinWidthSizeUnit, getNotCollapsedColumns, getPrintable, getPrintable, getRowHeaderWidth, getSortInfo, getSubPart, isAggregatable, isColumnHeaderVisible, isContextMenuEnabled, isMultiLineCells, isShowSelection, isShowTotalAggregation, isSortable, isTextSelectionEnabled, removeColumn, removeGeneratedColumn, removePrintable, removeStyleProvider, repaint, requestFocus, scrollTo, setAggregatable, setAggregationStyle, setColumnControlVisible, setColumnHeaderVisible, setColumnReorderingAllowed, setContextMenuEnabled, setEmptyStateLinkClickHandler, setEmptyStateLinkMessage, setEmptyStateMessage, setEnterPressAction, setIconProvider, setItemClickAction, setItemDescriptionProvider, setMinHeight, setMinWidth, setMultiLineCells, setMultiSelect, setRequired, setRowHeaderMode, setRowHeaderWidth, setShowSelection, setShowTotalAggregation, setSortable, setStyleProvider, setTextSelectionEnabled, showCustomPopup, showCustomPopupActions, sort
-
Field Details
-
groupAggregationCells
-
rerender
protected boolean rerender -
showItemsCountForGroup
protected boolean showItemsCountForGroup -
groupCellValueFormatter
-
-
Constructor Details
-
GroupTableImpl
public GroupTableImpl()
-
-
Method Details
-
setItems
Description copied from interface:Table
Sets an instance ofTableItems
as the Table data source.- Specified by:
setItems
in interfaceTable<E>
- Overrides:
setItems
in classAbstractTable<JmixGroupTable,
E> - Parameters:
tableItems
- the Table data source
-
createTableDataContainer
- Overrides:
createTableDataContainer
in classAbstractTable<JmixGroupTable,
E>
-
initComponent
- Overrides:
initComponent
in classAbstractTable<JmixGroupTable,
E>
-
createComponent
-
getSettingsBinder
- Overrides:
getSettingsBinder
in classAbstractTable<JmixGroupTable,
E>
-
__handleAggregationResults
protected Map<Object,Object> __handleAggregationResults(AggregationContainer.Context context, Map<Object, Object> results) - Overrides:
__handleAggregationResults
in classAbstractTable<JmixGroupTable,
E>
-
getNewColumnOrder
-
collectPropertiesByColumns
-
validateProperties
-
groupBy
Description copied from interface:GroupTable
Performs grouping by the givenproperties
.- Specified by:
groupBy
in interfaceGroupTable<E>
- Parameters:
properties
- an array ofMetaPropertyPath
-
groupByColumns
Description copied from interface:GroupTable
Performs grouping by the given ids of table columns.- Specified by:
groupByColumns
in interfaceGroupTable<E>
- Parameters:
columnIds
- column ids
-
ungroupByColumns
Description copied from interface:GroupTable
Resets grouping by the given ids of table columns.- Specified by:
ungroupByColumns
in interfaceGroupTable<E>
- Parameters:
columnIds
- column ids
-
ungroup
public void ungroup()Description copied from interface:GroupTable
Resets grouping at all.- Specified by:
ungroup
in interfaceGroupTable<E>
-
uselessGrouping
-
getColumnNN
-
getGroupCellValueFormatter
- Specified by:
getGroupCellValueFormatter
in interfaceGroupTable<E>
-
setGroupCellValueFormatter
- Specified by:
setGroupCellValueFormatter
in interfaceGroupTable<E>
-
expandAll
public void expandAll()- Specified by:
expandAll
in interfaceGroupTable<E>
-
expand
- Specified by:
expand
in interfaceGroupTable<E>
-
expandPath
Description copied from interface:GroupTable
Expand all groups for specified item.- Specified by:
expandPath
in interfaceGroupTable<E>
-
expandGroupsFor
-
collapseAll
public void collapseAll()- Specified by:
collapseAll
in interfaceGroupTable<E>
-
collapse
- Specified by:
collapse
in interfaceGroupTable<E>
-
isExpanded
- Specified by:
isExpanded
in interfaceGroupTable<E>
-
isFixedGrouping
public boolean isFixedGrouping()- Specified by:
isFixedGrouping
in interfaceGroupTable<E>
-
setFixedGrouping
public void setFixedGrouping(boolean fixedGrouping) - Specified by:
setFixedGrouping
in interfaceGroupTable<E>
-
isShowItemsCountForGroup
public boolean isShowItemsCountForGroup()- Specified by:
isShowItemsCountForGroup
in interfaceGroupTable<E>
- Returns:
- true if GroupTable shows items count for group
-
setShowItemsCountForGroup
public void setShowItemsCountForGroup(boolean showItemsCountForGroup) Description copied from interface:GroupTable
Show or hide items count for GroupTable groups.
Default value is true.- Specified by:
setShowItemsCountForGroup
in interfaceGroupTable<E>
-
getGeneratedCellStyle
- Overrides:
getGeneratedCellStyle
in classAbstractTable<JmixGroupTable,
E>
-
getAggregationResults
Description copied from interface:GroupTable
Returns a map with aggregation results for the given group info instance, where keys are table column ids and values are aggregation value.- Specified by:
getAggregationResults
in interfaceGroupTable<E>
- Parameters:
info
- the group info instance- Returns:
- aggregation results for the given group info instance
-
selectAll
public void selectAll()Description copied from interface:Table
Marks all the items in the current data source as selected.- Specified by:
selectAll
in interfaceTable<E>
- Overrides:
selectAll
in classAbstractTable<JmixGroupTable,
E>
-
getAllItemIds
-
collectItemIds
-
setAggregationDistributionProvider
public void setAggregationDistributionProvider(@Nullable Table.AggregationDistributionProvider<E> distributionProvider) Description copied from interface:Table
Sets aggregation distribution provider to handle distribution of data on rows. Supports only TOP aggregation style.- Specified by:
setAggregationDistributionProvider
in interfaceTable<E>
- Overrides:
setAggregationDistributionProvider
in classAbstractTable<JmixGroupTable,
E> - Parameters:
distributionProvider
- distribution provider
-
distributeGroupAggregation
protected boolean distributeGroupAggregation(JmixEnhancedTable.AggregationInputValueChangeContext context) -
formatAggregatableGroupPropertyValue
protected String formatAggregatableGroupPropertyValue(GroupInfo<MetaPropertyPath> groupId, @Nullable Object value) -
formatGroupPropertyValue
@Nullable protected String formatGroupPropertyValue(GroupInfo<MetaPropertyPath> groupId, @Nullable Object value) -
createColumn
- Overrides:
createColumn
in classAbstractTable<JmixGroupTable,
E>
-