public class OneSelectionTrackingListDataModel extends SerializableListDataModel implements SelectionAware
DataModel implementation that tracks the currently selected row, allowing only one selection at a time.| Constructor and Description |
|---|
OneSelectionTrackingListDataModel() |
OneSelectionTrackingListDataModel(java.util.List list) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getSelectedRow() |
java.util.List |
getSelections()
Returns the list of selected row data objects for the model.
|
boolean |
isCurrentRowSelected()
Checks whether the row pointed to by the model's current index is selected.
|
void |
select(java.lang.Object rowData)
Selects the given row data object in the model.
|
void |
selectAll()
Selects all row data objects in the model.
|
void |
setCurrentRowSelected(boolean rowSelected)
Sets whether the row pointed to by the model's current index is selected
|
void |
setSelections(java.util.List selections)
Sets the list of selected row data objects for the model.
|
getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, setRowIndex, setWrappedData, toStringpublic OneSelectionTrackingListDataModel()
public OneSelectionTrackingListDataModel(java.util.List list)
public java.util.List getSelections()
SelectionAwaregetSelections in interface SelectionAwarepublic boolean isCurrentRowSelected()
SelectionAwareisCurrentRowSelected in interface SelectionAwarepublic void select(java.lang.Object rowData)
SelectionAwareselect in interface SelectionAwarerowData - the row data object to select.public void selectAll()
SelectionAwareselectAll in interface SelectionAwarepublic void setCurrentRowSelected(boolean rowSelected)
SelectionAwaresetCurrentRowSelected in interface SelectionAwarerowSelected - true to select the current rowpublic void setSelections(java.util.List selections)
SelectionAwaresetSelections in interface SelectionAwareselections - the list of selected row data objectspublic java.lang.Object getSelectedRow()