com.extjs.gxt.ui.client.data
Class BaseTreeLoader<M extends ModelData>
java.lang.Object
com.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.data.BaseLoader<java.util.List<M>>
com.extjs.gxt.ui.client.data.BaseTreeLoader<M>
- Type Parameters:
M - the model data type
- All Implemented Interfaces:
- Loader<java.util.List<M>>, TreeLoader<M>, Observable
- Direct Known Subclasses:
- BaseRemoteSortTreeLoader
public class BaseTreeLoader<M extends ModelData>
- extends BaseLoader<java.util.List<M>>
- implements TreeLoader<M>
Default implementation of the TreeLoader interface.
- Events:
- BeforeLoad : LoadEvent(loader, config)
- loader : this
- config : the load config
- Load : LoadEvent(loader, config, result)
Fires after the button is selected.
- loader : this
- config : the load config
- result : the load result
- LoadException : LoadEvent(loader, config, result)
Fires after the button is selected.
- loader : this
- config : the load config
- result : the load result
|
Method Summary |
boolean |
hasChildren(M parent)
Returns whether the given model has children. |
boolean |
loadChildren(M parent)
Initiates a load request for the parent's children. |
| Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseTreeLoader
public BaseTreeLoader(DataProxy proxy)
- Creates a new tree loader instance.
- Parameters:
proxy - the data reader
BaseTreeLoader
public BaseTreeLoader(DataReader reader)
- Creates a new tree loader instance.
- Parameters:
reader - the data reader
BaseTreeLoader
public BaseTreeLoader(DataProxy proxy,
DataReader reader)
- Creates a new tree loader instance.
- Parameters:
proxy - the data proxyreader - the data reader
loadChildren
public boolean loadChildren(M parent)
- Description copied from interface:
TreeLoader
- Initiates a load request for the parent's children.
- Specified by:
loadChildren in interface TreeLoader<M extends ModelData>
- Parameters:
parent - the parent
- Returns:
- true if the load was requested
hasChildren
public boolean hasChildren(M parent)
- Description copied from interface:
TreeLoader
- Returns whether the given model has children.
- Specified by:
hasChildren in interface TreeLoader<M extends ModelData>
- Parameters:
parent - the parent model
- Returns:
- true if the given parent has children, and false if it has no
children