org.nuxeo.ecm.platform.ui.web.model.impl
Class AbstractSortableSelectDataModel
java.lang.Object
javax.faces.model.DataModel
org.nuxeo.ecm.platform.ui.web.model.impl.SelectDataModelImpl
org.nuxeo.ecm.platform.ui.web.model.impl.AbstractSortableSelectDataModel
- All Implemented Interfaces:
- Serializable, SelectDataModel, SortableDataModel
- Direct Known Subclasses:
- SortableSelectDocumentDataModelImpl
public abstract class AbstractSortableSelectDataModel
- extends SelectDataModelImpl
- implements SortableDataModel
Provides support for sorting table models. Inspired from Tomahawk examples.
Abstract method design pattern.
- Author:
- Razvan Caraghin
- See Also:
- Serialized Form
| Methods inherited from class org.nuxeo.ecm.platform.ui.web.model.impl.SelectDataModelImpl |
addSelectModelListener, generateSelectRows, getName, getRowCount, getRowData, getRowIndex, getRows, getSelectModelListeners, getWrappedData, isRowAvailable, removeSelectModelListener, setRowIndex, setRows, setWrappedData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SORT_ASCENDING
public static final int SORT_ASCENDING
- See Also:
- Constant Field Values
SORT_DESCENDING
public static final int SORT_DESCENDING
- See Also:
- Constant Field Values
sort
protected String sort
ascending
protected boolean ascending
AbstractSortableSelectDataModel
protected AbstractSortableSelectDataModel()
AbstractSortableSelectDataModel
protected AbstractSortableSelectDataModel(String name,
List data,
List selectedData,
String defaultSortColumn)
sort
public abstract void sort(String column,
boolean ascending)
- Sorts the list. Should be implemented by the children to customize the
sort (what comparators should be used, what other condition must be met).
- Specified by:
sort in interface SortableDataModel
isDefaultAscending
public abstract boolean isDefaultAscending(String sortColumn)
- Is the default sort direction for the given column "ascending"?
- Specified by:
isDefaultAscending in interface SortableDataModel
sort
public void sort(String sortColumn)
- Specified by:
sort in interface SortableDataModel
getSort
public String getSort()
- Specified by:
getSort in interface SortableDataModel
setSort
public void setSort(String sort)
- Specified by:
setSort in interface SortableDataModel
isAscending
public boolean isAscending()
- Specified by:
isAscending in interface SortableDataModel
setAscending
public void setAscending(boolean ascending)
- Specified by:
setAscending in interface SortableDataModel
Copyright ? 2007 Nuxeo SAS. All Rights Reserved.