E
- entity typepublic interface ListComponent<E> extends Component, Component.BelongToFrame, ActionsHolder
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier and Type | Method and Description |
---|---|
DataUnit |
getItems() |
java.util.Set<E> |
getSelected()
Returns a set of entity instances corresponding to the selected rows of the list component.
|
E |
getSingleSelected()
Returns an instance of entity corresponding to the selected row of the list component.
|
boolean |
isMultiSelect() |
void |
setSelected(java.util.Collection<E> items)
Selects the rows of the list component for a given collection of entity instances.
|
void |
setSelected(E item)
Selects a row of the list component for a given entity instance.
|
getFrame, setFrame
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
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
boolean isMultiSelect()
@Nullable E getSingleSelected()
null
. If multiple selection mode is enabled, returns the first selected instance.java.util.Set<E> getSelected()
Collections.emptySet()
.void setSelected(@Nullable E item)
item
- entity instance to select the row, null
to reset the selectionvoid setSelected(java.util.Collection<E> items)
items
- collection of entity instances to select rows@Nullable DataUnit getItems()