Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.ui.web.model.impl
Class SortableSelectDocumentDataModelImpl

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by org.nuxeo.ecm.platform.ui.web.model.impl.SelectDataModelImpl
          extended by org.nuxeo.ecm.platform.ui.web.model.impl.AbstractSortableSelectDataModel
              extended by org.nuxeo.ecm.platform.ui.web.model.impl.SortableSelectDocumentDataModelImpl
All Implemented Interfaces:
Serializable, SelectDataModel, SortableDataModel

public class SortableSelectDocumentDataModelImpl
extends AbstractSortableSelectDataModel

Sortable select document data model that performs sorts assuming rows are SelectModelRow containment DocumentModel data.

The column sort criterion should be the string 'schemaName:fieldName' like for instance 'dublincore:title'.

Author:
Anahide Tchertchian
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.nuxeo.ecm.platform.ui.web.model.impl.AbstractSortableSelectDataModel
SORT_ASCENDING, SORT_DESCENDING
 
Constructor Summary
SortableSelectDocumentDataModelImpl(String name, List data, List selectedData, String defaultSortColumn)
           
 
Method Summary
 List<SelectDataModelRow> getRows()
           
 boolean isDefaultAscending(String sortColumn)
          Is the default sort direction for the given column "ascending"?
 void sort(String column, boolean ascending)
          Sorts the list.
 
Methods inherited from class org.nuxeo.ecm.platform.ui.web.model.impl.AbstractSortableSelectDataModel
getSort, isAscending, setAscending, setSort, sort
 
Methods inherited from class org.nuxeo.ecm.platform.ui.web.model.impl.SelectDataModelImpl
addSelectModelListener, getName, getRowCount, getRowData, getRowIndex, 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
 

Constructor Detail

SortableSelectDocumentDataModelImpl

public SortableSelectDocumentDataModelImpl(String name,
                                           List data,
                                           List selectedData,
                                           String defaultSortColumn)
Method Detail

getRows

public List<SelectDataModelRow> getRows()
Specified by:
getRows in interface SelectDataModel
Overrides:
getRows in class SelectDataModelImpl

isDefaultAscending

public boolean isDefaultAscending(String sortColumn)
Description copied from class: AbstractSortableSelectDataModel
Is the default sort direction for the given column "ascending"?

Specified by:
isDefaultAscending in interface SortableDataModel
Specified by:
isDefaultAscending in class AbstractSortableSelectDataModel

sort

public void sort(String column,
                 boolean ascending)
Description copied from class: AbstractSortableSelectDataModel
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
Specified by:
sort in class AbstractSortableSelectDataModel

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.