org.richfaces.component
Class AbstractTreeDataModel
java.lang.Object
javax.faces.model.DataModel
org.ajax4jsf.ajax.repeat.ExtendedDataModel
org.richfaces.component.AbstractTreeDataModel
- Direct Known Subclasses:
- TreeDataModel
public abstract class AbstractTreeDataModel
- extends org.ajax4jsf.ajax.repeat.ExtendedDataModel
- Author:
- Nick Belaevski - nbelaevski@exadel.com created 07.12.2006
Base class for all tree data models
Method Summary |
int |
getRowCount()
|
int |
getRowIndex()
|
abstract TreeNode |
getTreeNode()
|
java.lang.Object |
getWrappedData()
|
abstract boolean |
isLeaf()
returns whether this node is leaf |
protected void |
processElement(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
java.lang.Object argument,
TreeRowKey treeRowKey,
boolean last)
Processes concrete tree node. |
void |
setRowIndex(int rowIndex)
|
void |
setWrappedData(java.lang.Object data)
|
void |
walk(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
org.ajax4jsf.ajax.repeat.Range range,
java.lang.Object argument)
|
abstract void |
walk(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
org.ajax4jsf.ajax.repeat.Range range,
TreeRowKey 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,
org.ajax4jsf.ajax.repeat.DataVisitor visitor,
TreeRange range,
TreeRowKey key,
java.lang.Object argument,
boolean last)
Walk backing sub-model having row key argument as its root. |
Methods inherited from class org.ajax4jsf.ajax.repeat.ExtendedDataModel |
getRowKey, getSerializableModel, setRowKey |
Methods inherited from class javax.faces.model.DataModel |
addDataModelListener, getDataModelListeners, getRowData, isRowAvailable, removeDataModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
public static final char SEPARATOR
- See Also:
- Constant Field Values
AbstractTreeDataModel
public AbstractTreeDataModel()
getRowCount
public final int getRowCount()
- Specified by:
getRowCount
in class javax.faces.model.DataModel
getRowIndex
public final int getRowIndex()
- Specified by:
getRowIndex
in class javax.faces.model.DataModel
setRowIndex
public final void setRowIndex(int rowIndex)
- Specified by:
setRowIndex
in class javax.faces.model.DataModel
getWrappedData
public final java.lang.Object getWrappedData()
- Specified by:
getWrappedData
in class javax.faces.model.DataModel
setWrappedData
public final void setWrappedData(java.lang.Object data)
- Specified by:
setWrappedData
in class javax.faces.model.DataModel
walk
public final void walk(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
org.ajax4jsf.ajax.repeat.Range range,
java.lang.Object argument)
throws java.io.IOException
- Specified by:
walk
in class org.ajax4jsf.ajax.repeat.ExtendedDataModel
- Throws:
java.io.IOException
walk
public abstract void walk(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
org.ajax4jsf.ajax.repeat.Range range,
TreeRowKey rowKey,
java.lang.Object argument,
boolean last)
throws java.io.IOException
- walk sub-model having row key argument as its root
- Parameters:
context
- faces contextdataVisitor
- 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
- Throws:
java.io.IOException
- See Also:
ExtendedDataModel#walk(FacesContext, DataVisitor, Range, Object)}
isLeaf
public abstract boolean isLeaf()
- returns whether this node is leaf
- Returns:
walkModel
public abstract void walkModel(javax.faces.context.FacesContext facesContext,
org.ajax4jsf.ajax.repeat.DataVisitor visitor,
TreeRange range,
TreeRowKey key,
java.lang.Object argument,
boolean last)
throws java.io.IOException
- Walk backing sub-model having row key argument as its root. If there is no backing model
configured, calling this method is equivalent to calling
walk(FacesContext, DataVisitor, Range, TreeRowKey, Object, boolean)
- Parameters:
facesContext
- faces contextvisitor
- UIDataAdaptor.ComponentVisitor
instancerange
- TreeRange
to constraint the walkkey
- row key to treat as root of sub-modelargument
- implementation-specific argument
- Throws:
java.io.IOException
- See Also:
#walk(FacesContext, DataVisitor, Range, TreeRowKey, Object, boolean)}
processElement
protected void processElement(javax.faces.context.FacesContext context,
org.ajax4jsf.ajax.repeat.DataVisitor dataVisitor,
java.lang.Object argument,
TreeRowKey treeRowKey,
boolean last)
throws java.io.IOException
- Processes concrete tree node. Knows about
LastElementAware
interface and handles it
properly. Checks if argument is instance of SubTreeChildrenAppender
and if it is so
does appending current element
- Parameters:
context
- dataVisitor
- argument
- treeRowKey
- last
-
- Throws:
java.io.IOException
getTreeNode
public abstract TreeNode getTreeNode()
Copyright © 2007. All Rights Reserved.