com.extjs.gxt.ui.client.data
Class TreeModelReader<D extends java.util.List<? extends ModelData>>

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.TreeModelReader<D>
All Implemented Interfaces:
DataReader<D>

public class TreeModelReader<D extends java.util.List<? extends ModelData>>
extends java.lang.Object
implements DataReader<D>

A DataReader that simply returns the children of the passed TreeModel.


Constructor Summary
TreeModelReader()
          Creates a tree model reader.
TreeModelReader(java.lang.String childrenProperty)
          Creates a new tree model reader.
 
Method Summary
 java.lang.String getChildrenProperty()
          Returns the property name that contains the model's children.
 D read(java.lang.Object loadConfig, java.lang.Object data)
          Reads the raw data and returns the typed data.
 void setChildrenProperty(java.lang.String childrenProperty)
          Sets the property name that contains the children for the parent model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeModelReader

public TreeModelReader()
Creates a tree model reader.


TreeModelReader

public TreeModelReader(java.lang.String childrenProperty)
Creates a new tree model reader.

Parameters:
childrenProperty - the children property name
Method Detail

read

public D read(java.lang.Object loadConfig,
              java.lang.Object data)
Description copied from interface: DataReader
Reads the raw data and returns the typed data.

Specified by:
read in interface DataReader<D extends java.util.List<? extends ModelData>>
data - the data to read
Returns:
the data

getChildrenProperty

public java.lang.String getChildrenProperty()
Returns the property name that contains the model's children.

Returns:
the children property name

setChildrenProperty

public void setChildrenProperty(java.lang.String childrenProperty)
Sets the property name that contains the children for the parent model.

Parameters:
childrenProperty - the property name