|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.model.DataModel
org.apache.myfaces.trinidad.model.CollectionModel
org.apache.myfaces.trinidad.model.SortableModel
org.apache.myfaces.trinidad.model.RowKeyPropertyModel
public class RowKeyPropertyModel
Creates a CollectionModel whose row keys are defined by a unique data property in the model.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.myfaces.trinidad.model.SortableModel |
|---|
SortableModel.Decomposition, SortableModel.Strength |
| Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex |
|---|
LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy |
| Constructor Summary | |
|---|---|
RowKeyPropertyModel()
No arg constructor for use as a managed-bean. |
|
RowKeyPropertyModel(Object model,
String rowKeyProperty)
Creates a RowKeyPropertyModel. |
|
| Method Summary | |
|---|---|
Object |
getRowKey()
Gets the row key for the current row |
protected Object |
getRowKey(Object row)
gets the row key for the given row by resolving the _rowKeyProperty |
String |
getRowKeyProperty()
Gets the row key property name for this model |
void |
setRowKey(Object key)
Moves the model to the row identified by the key. |
void |
setRowKeyProperty(String rowKeyProperty)
Sets the row key property for this model |
| Methods inherited from class org.apache.myfaces.trinidad.model.SortableModel |
|---|
addDataModelListener, getComparator, getDataModelListeners, getRowCount, getRowData, getRowIndex, getSortCriteria, getWrappedData, isRowAvailable, isSortable, removeDataModelListener, setCollator, setComparator, setRowIndex, setSortCriteria, setWrappedData, toString |
| Methods inherited from class org.apache.myfaces.trinidad.model.CollectionModel |
|---|
addRowKeyChangeListener, areRowsAvailable, areRowsAvailable, areRowsAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, clearCachedRow, clearCachedRow, clearCachedRows, clearCachedRows, clearLocalCache, fireRowKeyChange, getCachingStrategy, getEstimatedRowCount, getEstimatedRowCountConfidence, getRowData, getRowData, isRowAvailable, isRowAvailable, isRowLocallyAvailable, isRowLocallyAvailable, removeRowKeyChangeListener |
| Methods inherited from class javax.faces.model.DataModel |
|---|
iterator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RowKeyPropertyModel(Object model,
String rowKeyProperty)
model - The underlying model. If necessary, this will be converted into a DataModelrowKeyProperty - The property by which the row key can be accessed. Row key value must be uniquepublic RowKeyPropertyModel()
SortableModel.setWrappedData(java.lang.Object) and setRowKeyProperty(java.lang.String) before using this instance.
| Method Detail |
|---|
public Object getRowKey()
getRowKey in interface RowKeyIndexgetRowKey in class SortableModelCollectionModel.setRowKey(java.lang.Object)public void setRowKey(Object key)
setRowKey in interface RowKeyIndexsetRowKey in class SortableModelkey - target row keypublic String getRowKeyProperty()
public void setRowKeyProperty(String rowKeyProperty)
rowKeyProperty - row key property to setprotected Object getRowKey(Object row)
row - row to retrieve the row key for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||