|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.model.DataModel org.ajax4jsf.model.ExtendedDataModel org.richfaces.model.AbstractTreeDataModel
public abstract class AbstractTreeDataModel
Base class for all tree data models
Field Summary | |
---|---|
static char |
SEPARATOR
|
Constructor Summary | |
---|---|
AbstractTreeDataModel()
|
Method Summary | |
---|---|
void |
addNode(java.lang.Object parentRowKey,
java.lang.Object newNode,
java.lang.Object id)
|
void |
addNode(java.lang.Object parentRowKey,
TreeNode newNode,
java.lang.Object id)
|
abstract java.lang.Object |
convertToKey(javax.faces.context.FacesContext context,
java.lang.String keyString,
javax.faces.component.UIComponent component,
javax.faces.convert.Converter converter)
|
java.lang.Object |
getChildNodeId(java.lang.Object childNode)
Get node local id in it's parent childs collection |
TreeNode |
getModelTreeNode()
Get model node recursively with all sub nodes. |
java.lang.Object |
getParentRowKey(java.lang.Object key)
|
int |
getRowCount()
|
int |
getRowIndex()
|
abstract TreeNode |
getTreeNode()
Get current tree node. |
java.lang.Object |
getTreeNodeRowKey(java.lang.Object node)
Get row key for certain tree node object |
abstract boolean |
isLeaf()
returns whether this node is leaf |
protected void |
processElement(javax.faces.context.FacesContext context,
DataVisitor dataVisitor,
java.lang.Object argument,
TreeRowKey treeRowKey,
boolean last)
Processes concrete tree node. |
void |
removeNode(java.lang.Object rowKey)
|
void |
setRowIndex(int rowIndex)
|
void |
walk(javax.faces.context.FacesContext context,
DataVisitor dataVisitor,
Range range,
java.lang.Object argument)
Iterate over model by "visitor" pattern, for given range |
abstract void |
walk(javax.faces.context.FacesContext context,
DataVisitor dataVisitor,
Range range,
java.lang.Object rowKey,
java.lang.Object argument,
boolean last)
walk sub-model having row key argument as its root |
abstract void |
walkModel(javax.faces.context.FacesContext facesContext,
DataVisitor visitor,
Range range,
java.lang.Object key,
java.lang.Object argument,
boolean last)
Walk backing sub-model having row key argument as its root. |
Methods inherited from class org.ajax4jsf.model.ExtendedDataModel |
---|
getRowKey, getSerializableModel, setRowKey |
Methods inherited from class javax.faces.model.DataModel |
---|
addDataModelListener, getDataModelListeners, getRowData, getWrappedData, isRowAvailable, removeDataModelListener, setWrappedData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char SEPARATOR
Constructor Detail |
---|
public AbstractTreeDataModel()
Method Detail |
---|
public final int getRowCount()
getRowCount
in class javax.faces.model.DataModel
public final int getRowIndex()
getRowIndex
in class javax.faces.model.DataModel
public final void setRowIndex(int rowIndex)
setRowIndex
in class javax.faces.model.DataModel
public final void walk(javax.faces.context.FacesContext context, DataVisitor dataVisitor, Range range, java.lang.Object argument) throws java.io.IOException
ExtendedDataModel
walk
in class ExtendedDataModel
context
- current JSF context.dataVisitor
- instance of DataVisitor
, for process each row.range
- Implementation-specific range of data keys.argument
- Implementation-specific argument
java.io.IOException
public abstract void walk(javax.faces.context.FacesContext context, DataVisitor dataVisitor, Range range, java.lang.Object rowKey, java.lang.Object argument, boolean last) throws java.io.IOException
context
- faces contextdataVisitor
- org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor
range
- TreeRange
to constraint the walkrowKey
- row key to treat as root of sub-modelargument
- implementation specific argumentlast
- boolean flag indicating whether we started our walk from last element
java.io.IOException
ExtendedDataModel#walk(FacesContext, DataVisitor, Range, Object)}
public abstract boolean isLeaf()
public abstract void walkModel(javax.faces.context.FacesContext facesContext, DataVisitor visitor, Range range, java.lang.Object key, java.lang.Object argument, boolean last) throws java.io.IOException
walk(FacesContext, DataVisitor, Range, Object, Object, boolean)
facesContext
- faces contextvisitor
- org.ajax4jsf.ajax.repeat.UIDataAdaptor.ComponentVisitor
instancerange
- Range
to constraint the walkkey
- row key to treat as root of sub-modelargument
- implementation-specific argument
java.io.IOException
#walk(FacesContext, DataVisitor, Range, TreeRowKey, Object, boolean)}
protected void processElement(javax.faces.context.FacesContext context, DataVisitor dataVisitor, java.lang.Object argument, TreeRowKey treeRowKey, boolean last) throws java.io.IOException
LastElementAware
interface and handles it
properly. Checks if argument is instance of SubTreeChildrenAppender
and if it is so
does appending current element
context
- dataVisitor
- argument
- treeRowKey
- last
-
java.io.IOException
public abstract TreeNode getTreeNode()
public TreeNode getModelTreeNode()
public abstract java.lang.Object convertToKey(javax.faces.context.FacesContext context, java.lang.String keyString, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter)
public java.lang.Object getTreeNodeRowKey(java.lang.Object node)
node
- to get key for
public java.lang.Object getChildNodeId(java.lang.Object childNode)
childNode
- node to get identifier for
public java.lang.Object getParentRowKey(java.lang.Object key)
public void addNode(java.lang.Object parentRowKey, java.lang.Object newNode, java.lang.Object id)
public void addNode(java.lang.Object parentRowKey, TreeNode newNode, java.lang.Object id)
public void removeNode(java.lang.Object rowKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |