org.apache.myfaces.component.html.ext
Class SortableModel

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by org.apache.myfaces.component.html.ext.BaseSortableModel
          extended by org.apache.myfaces.component.html.ext.SortableModel

public final class SortableModel
extends BaseSortableModel


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.myfaces.component.html.ext.BaseSortableModel
BaseSortableModel.RowDataComparator
 
Field Summary
 
Fields inherited from class org.apache.myfaces.component.html.ext.BaseSortableModel
_model
 
Constructor Summary
SortableModel()
          No arg constructor for use as a managed-bean.
SortableModel(Object model)
          Create a new SortableModel from the given instance.
 
Method Summary
 List getSortCriteria()
           
 boolean isSortable(String property)
          Checks to see if the underlying collection is sortable by the given property.
 void setSortCriteria(List criteria)
           
 void setWrappedData(Object data)
          Sets the underlying data being managed by this instance.
 String toString()
           
 
Methods inherited from class org.apache.myfaces.component.html.ext.BaseSortableModel
getComparator, getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, setComparator, setRowIndex, sort, toDataModel
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SortableModel

public SortableModel(Object model)
Create a new SortableModel from the given instance.

Parameters:
model - This will be converted into a DataModel
See Also:
setWrappedData(java.lang.Object)

SortableModel

public SortableModel()
No arg constructor for use as a managed-bean. Must call setWrappedData before using this instance.

Method Detail

setWrappedData

public void setWrappedData(Object data)
Sets the underlying data being managed by this instance.

Overrides:
setWrappedData in class BaseSortableModel
Parameters:
data - This Object will be converted into a DataModel.

isSortable

public boolean isSortable(String property)
Checks to see if the underlying collection is sortable by the given property.

Parameters:
property - The name of the property to sort the underlying collection by.
Returns:
true, if the property implements java.lang.Comparable

getSortCriteria

public List getSortCriteria()

setSortCriteria

public void setSortCriteria(List criteria)

toString

public String toString()
Overrides:
toString in class BaseSortableModel


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.