public class ManySelectionTrackingListDataModel<T> extends SerializableListDataModel<T> implements SelectionAware<T>
DataModel implementation that tracks the currently selected rows, allowing any number of rows to be
selected at one time.| Constructor and Description |
|---|
ManySelectionTrackingListDataModel() |
ManySelectionTrackingListDataModel(java.util.List<T> list) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<T> |
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(T 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<T> selections)
Sets the list of selected row data objects for the model.
|
getWrappedData, setWrappedData, toStringgetRowCount, getRowData, getRowIndex, isRowAvailable, setRowIndexpublic ManySelectionTrackingListDataModel()
public ManySelectionTrackingListDataModel(java.util.List<T> list)
public java.util.List<T> getSelections()
SelectionAwaregetSelections in interface SelectionAware<T>public boolean isCurrentRowSelected()
SelectionAwareisCurrentRowSelected in interface SelectionAware<T>public void selectAll()
SelectionAwareselectAll in interface SelectionAware<T>public void setCurrentRowSelected(boolean rowSelected)
SelectionAwaresetCurrentRowSelected in interface SelectionAware<T>rowSelected - true to select the current rowpublic void setSelections(java.util.List<T> selections)
SelectionAwaresetSelections in interface SelectionAware<T>selections - the list of selected row data objectspublic void select(T rowData)
SelectionAwareselect in interface SelectionAware<T>rowData - the row data object to select.