@Deprecated public static interface Grid.SelectionModel.Single extends Grid.SelectionModel
This interface has a contract of having the same behavior, no matter how the selection model is interacted with. In other words, if something is forbidden to do in e.g. the user interface, it must also be forbidden to do in the server-side and client-side APIs.
Grid.SelectionModel.HasUserSelectionAllowed, Grid.SelectionModel.Multi, Grid.SelectionModel.None, Grid.SelectionModel.Single
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
Object |
getSelectedRow()
Deprecated.
Gets the item id of the currently selected item.
|
boolean |
isDeselectAllowed()
Deprecated.
Sets whether it's allowed to deselect the selected row through
the UI.
|
boolean |
select(Object itemId)
Deprecated.
Marks an item as selected.
|
void |
setDeselectAllowed(boolean deselectAllowed)
Deprecated.
Sets whether it's allowed to deselect the selected row through
the UI.
|
getSelectedRows, isSelected, reset, setGrid
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
boolean select(Object itemId) throws IllegalStateException, IllegalArgumentException
itemId
- the itemId to mark as selected; null
for
deselecttrue
if the selection state changed.
false
if the itemId already was selectedIllegalStateException
- if the selection was illegal. One such reason might
be that the given id was null, indicating a deselect,
but implementation doesn't allow deselecting.
re-selecting somethingIllegalArgumentException
- if given itemId does not exist in the container of
GridObject getSelectedRow()
null
if nothing is selectedvoid setDeselectAllowed(boolean deselectAllowed)
deselectAllowed
- true
if the selected row can be
deselected without selecting another row instead;
otherwise false
.boolean isDeselectAllowed()
true
if deselection is allowed; otherwise
false
Copyright © 2020 Vaadin Ltd. All rights reserved.