|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.faces.model.DataModel | +--oracle.adf.view.faces.model.CollectionModel | +--oracle.adf.view.faces.model.TreeModel | +--oracle.adf.view.faces.model.ChildPropertyTreeModel
Creates a TreeModel from some other instance.
Constructor Summary | |
ChildPropertyTreeModel(CollectionModel model,
java.lang.String childProperty)
Creates a TreeModel from the given CollectionModel |
|
ChildPropertyTreeModel(java.lang.Object instance,
java.lang.String childProperty)
Creates a TreeModel |
Method Summary | |
protected CollectionModel |
createChildModel(java.lang.Object childData)
Converts childData into a CollectionModel |
protected java.lang.Object |
getChildData(java.lang.Object parentData)
Gets the child data for a node |
java.lang.Object |
getParentData()
Gets the rowData of the parent that contains this Collection of children. |
java.util.List |
getPath()
Gets the path that points to the row that is the parentData of this collection |
int |
getRowCount()
|
java.lang.Object |
getRowData()
|
int |
getRowIndex()
|
java.lang.String |
getRowKey()
Gets the row key of the current row |
java.lang.String |
getSortBy()
Gets the property that this collection is sorted on. |
boolean |
getSortOrder()
Gets the sort order |
java.lang.Object |
getWrappedData()
|
boolean |
isRowAvailable()
|
boolean |
isRowContainer()
Tests to see if the row identified by getRowData() has children. |
boolean |
isSortable(java.lang.String property)
Return true iff this collection is sortable by the given property |
void |
popPath()
Removes the last rowKey from the path. |
void |
pushPath()
The row identified by getRowKey() is added to the path and made the new parent. |
void |
setPath(java.util.List path)
sets the path. |
void |
setRowIndex(int rowIndex)
|
void |
setRowKey(java.lang.String key)
Finds the row with the matching key and makes it current |
void |
setWrappedData(java.lang.Object data)
|
void |
sort(java.lang.String sortBy,
boolean sortOrder)
Sort this collection by the given property |
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, toString, wait, wait, wait |
Constructor Detail |
public ChildPropertyTreeModel(java.lang.Object instance, java.lang.String childProperty) throws java.beans.IntrospectionException
instance
- This instance is first converted into a CollectionModel.childProperty
- This property will be used to get at the child Lists
from each rowData returned by getRowData()
java.beans.IntrospectionException
public ChildPropertyTreeModel(CollectionModel model, java.lang.String childProperty) throws java.beans.IntrospectionException
model
- childProperty
- This property will be used to get at the child Lists
from each rowData returned by getRowData()
java.beans.IntrospectionException
- if the Objects in the
CollectionModel cannot be introspected (eg: if they are not public).Method Detail |
protected java.lang.Object getChildData(java.lang.Object parentData)
parentData
- the node to get the child data from
protected CollectionModel createChildModel(java.lang.Object childData)
childData
- the data to convert. This can be a List or array.public java.lang.Object getParentData()
TreeModel
getParentData
in class TreeModel
public java.util.List getPath()
TreeModel
getPath
in class TreeModel
public int getRowCount()
getRowCount
in class javax.faces.model.DataModel
public java.lang.Object getRowData()
getRowData
in class javax.faces.model.DataModel
public int getRowIndex()
getRowIndex
in class javax.faces.model.DataModel
public java.lang.Object getWrappedData()
getWrappedData
in class javax.faces.model.DataModel
public boolean isRowContainer()
TreeModel
isRowContainer
in class TreeModel
public boolean isRowAvailable()
isRowAvailable
in class javax.faces.model.DataModel
public void popPath()
TreeModel
popPath
in class TreeModel
public void pushPath()
TreeModel
pushPath
in class TreeModel
public void setPath(java.util.List path)
setPath
in class TreeModel
path
- each element is a rowKey and is of type String.
Use null to clear the path
and point this Collection back to the root Collection.public void setRowIndex(int rowIndex)
setRowIndex
in class javax.faces.model.DataModel
public void setWrappedData(java.lang.Object data)
setWrappedData
in class javax.faces.model.DataModel
data
- public void sort(java.lang.String sortBy, boolean sortOrder)
CollectionModel
sort
in class CollectionModel
sortBy
- the property to sort onsortOrder
- true for ascending. false for descendingpublic void setRowKey(java.lang.String key)
CollectionModel
setRowKey
in class CollectionModel
key
- this String cannot contain spacespublic boolean isSortable(java.lang.String property)
CollectionModel
isSortable
in class CollectionModel
public boolean getSortOrder()
CollectionModel
getSortOrder
in class CollectionModel
public java.lang.String getSortBy()
CollectionModel
getSortBy
in class CollectionModel
public java.lang.String getRowKey()
CollectionModel
getRowKey
in class CollectionModel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |