C- the selection component type
T- the type of the selected item
public class SingleSelectionEvent<C extends Component,T> extends AbstractField.ComponentValueChangeEvent<C,T> implements SelectionEvent<C,T>
|Constructor and Description|
Creates a new selection change event in a component.
|Modifier and Type||Method and Description|
Gets all the currently selected items.
Get first selected data item.
Returns an optional of the item that was selected, or an empty optional if a previously selected item was deselected.
The listing component on which the Event initially occurred.
getHasValue, getOldValue, getValue, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public SingleSelectionEvent(C listing, SingleSelect<C,T> source, T oldSelection, boolean userOriginated)
listing- the listing component where the event originated
source- the single select source
oldSelection- the item that was previously selected
trueif this event originates from the client,
public C getSource()
This is the same as
case of single selection.
This method applies more to multiselection - for single select it returns either an empty set or a set containing the only selected item.
Copyright © 2021. All rights reserved.