Package io.jmix.ui.component
Interface ListComponent<E>
- Type Parameters:
E- entity type
- All Superinterfaces:
ActionsHolder,Component,Component.BelongToFrame,HasSubParts
- All Known Subinterfaces:
DataGrid<E>,GroupTable<E>,Table<E>,Tree<E>,TreeDataGrid<E>,TreeTable<E>
- All Known Implementing Classes:
AbstractDataGrid,AbstractTable,DataGridImpl,GroupTableImpl,TableImpl,TreeDataGridImpl,TreeImpl,TreeTableImpl
A component that can display tabular data.
-
Nested Class Summary
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 -
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptiongetItems()Returns a set of entity instances corresponding to the selected rows of the list component.Returns an instance of entity corresponding to the selected row of the list component.booleanvoidsetSelected(E item) Selects a row of the list component for a given entity instance.voidsetSelected(Collection<E> items) Selects the rows of the list component for a given collection of entity instances.Methods inherited from interface io.jmix.ui.component.ActionsHolder
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActionsMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
-
Method Details
-
isMultiSelect
boolean isMultiSelect()- Returns:
- true if multiple selection mode is enabled
-
getSingleSelected
Returns an instance of entity corresponding to the selected row of the list component. If nothing is selected, the method returnsnull. If multiple selection mode is enabled, returns the first selected instance.- Returns:
- an instance of entity corresponding to the selected row of the list component
-
getSelected
Returns a set of entity instances corresponding to the selected rows of the list component. If nothing is selected, the method returns aCollections.emptySet().- Returns:
- a set of entity instances corresponding to the selected rows of the list component
-
setSelected
Selects a row of the list component for a given entity instance.- Parameters:
item- entity instance to select the row,nullto reset the selection
-
setSelected
Selects the rows of the list component for a given collection of entity instances.- Parameters:
items- collection of entity instances to select rows
-
getItems
- Returns:
- a list component items
-