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:
- java.io.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
Method Summary |
java.lang.String |
getSort()
|
boolean |
isAscending()
|
abstract boolean |
isDefaultAscending(java.lang.String sortColumn)
Is the default sort direction for the given column "ascending"? |
void |
setAscending(boolean ascending)
|
void |
setSort(java.lang.String sort)
|
void |
sort(java.lang.String sortColumn)
|
abstract void |
sort(java.lang.String column,
boolean ascending)
Sorts the list. |
Methods inherited from class org.nuxeo.ecm.platform.ui.web.model.impl.SelectDataModelImpl |
addSelectModelListener, getName, getRowCount, getRowData, getRowIndex, getRows, getSelectModelListeners, getWrappedData, isRowAvailable, removeSelectModelListener, setRowIndex, setRows, setWrappedData |
Methods inherited from class javax.faces.model.DataModel |
addDataModelListener, getDataModelListeners, removeDataModelListener |
Methods inherited from class java.lang.Object |
equals, 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
public abstract void sort(java.lang.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(java.lang.String sortColumn)
- Is the default sort direction for the given column "ascending"?
- Specified by:
isDefaultAscending
in interface SortableDataModel
sort
public void sort(java.lang.String sortColumn)
- Specified by:
sort
in interface SortableDataModel
getSort
public java.lang.String getSort()
- Specified by:
getSort
in interface SortableDataModel
setSort
public void setSort(java.lang.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 © 2010 Nuxeo SAS. All Rights Reserved.