org.apache.myfaces.component.html.ext
Class SortableModel
java.lang.Object
javax.faces.model.DataModel
org.apache.myfaces.component.html.ext.BaseSortableModel
org.apache.myfaces.component.html.ext.SortableModel
- All Implemented Interfaces:
- java.lang.Iterable
public final class SortableModel
- extends BaseSortableModel
Constructor Summary |
SortableModel()
No arg constructor for use as a managed-bean. |
SortableModel(java.lang.Object model)
Create a new SortableModel from the given instance. |
Method Summary |
java.util.List |
getSortCriteria()
|
boolean |
isSortable(java.lang.String property)
Checks to see if the underlying collection is sortable by the given property. |
void |
setSortCriteria(java.util.List criteria)
|
void |
setWrappedData(java.lang.Object data)
Sets the underlying data being managed by this instance. |
java.lang.String |
toString()
|
Methods inherited from class javax.faces.model.DataModel |
addDataModelListener, getDataModelListeners, iterator, removeDataModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SortableModel
public SortableModel(java.lang.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.
setWrappedData
public void setWrappedData(java.lang.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(java.lang.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 java.util.List getSortCriteria()
setSortCriteria
public void setSortCriteria(java.util.List criteria)
toString
public java.lang.String toString()
- Overrides:
toString
in class BaseSortableModel
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.