|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.data.BaseLoader<D>
D
- the data type being returned by this loaderpublic class BaseLoader<D>
Abstract base loader implementation.
Field Summary | |
---|---|
protected java.lang.Object |
lastConfig
|
protected DataProxy<D> |
proxy
|
protected DataReader<D> |
reader
|
protected boolean |
reuseConfig
|
Fields inherited from interface com.extjs.gxt.ui.client.data.Loader |
---|
BeforeLoad, Load, LoadException |
Constructor Summary | |
---|---|
BaseLoader(DataProxy<D> proxy)
Creates a new base loader instance. |
|
BaseLoader(DataProxy<D> proxy,
DataReader<D> reader)
Creates a new loader with the given proxy and reader. |
|
BaseLoader(DataReader<D> reader)
Creates a new base loader instance. |
Method Summary | |
---|---|
void |
addLoadListener(LoadListener listener)
Adds a load listener. |
java.lang.Object |
getLastConfig()
Returns the last config. |
DataProxy<? extends D> |
getProxy()
Returns the loader's data proxy. |
boolean |
isReuseLoadConfig()
Returns true if the load config is being reused. |
boolean |
load()
Loads the data using the current configuration. |
boolean |
load(java.lang.Object loadConfig)
Loads the data using the given load configuration. |
protected void |
loadData(java.lang.Object config)
|
protected void |
loadData(java.lang.Object config,
com.google.gwt.user.client.rpc.AsyncCallback<D> callback)
Called when a proxy is not being used. |
protected java.lang.Object |
newLoadConfig()
Template method to allow custom BaseLoader subclasses to provide their own implementation of LoadConfig |
protected void |
onLoadFailure(java.lang.Object loadConfig,
java.lang.Throwable t)
Called when a load operation fails. |
protected void |
onLoadSuccess(java.lang.Object loadConfig,
D data)
Called when the remote data has been received. |
protected java.lang.Object |
prepareLoadConfig(java.lang.Object config)
Template method to allow custom subclasses to prepare the load config prior to loading data |
void |
removeLoadListener(LoadListener listener)
Removes a load listener. |
void |
setReuseLoadConfig(boolean reuseLoadConfig)
Sets whether the same load config instance should be used for load operations. |
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
---|
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.extjs.gxt.ui.client.event.Observable |
---|
addListener, fireEvent, getListeners, hasListeners, hasListeners, removeAllListeners, removeListener |
Field Detail |
---|
protected DataProxy<D> proxy
protected DataReader<D> reader
protected java.lang.Object lastConfig
protected boolean reuseConfig
Constructor Detail |
---|
public BaseLoader(DataProxy<D> proxy)
proxy
- the data proxypublic BaseLoader(DataProxy<D> proxy, DataReader<D> reader)
proxy
- the data proxyreader
- an optional data reader, if null, null will be passed to
proxy.load(Reader, LoadConfig, DataCallback)public BaseLoader(DataReader<D> reader)
reader
- the readerMethod Detail |
---|
public void addLoadListener(LoadListener listener)
Loader
addLoadListener
in interface Loader<D>
listener
- the listener to addpublic java.lang.Object getLastConfig()
public DataProxy<? extends D> getProxy()
public boolean isReuseLoadConfig()
public boolean load()
Loader
load
in interface Loader<D>
public boolean load(java.lang.Object loadConfig)
Loader
load
in interface Loader<D>
loadConfig
- the load config
public void removeLoadListener(LoadListener listener)
Loader
removeLoadListener
in interface Loader<D>
listener
- the listener to removepublic void setReuseLoadConfig(boolean reuseLoadConfig)
reuseLoadConfig
- true to reuseprotected void loadData(java.lang.Object config)
protected void loadData(java.lang.Object config, com.google.gwt.user.client.rpc.AsyncCallback<D> callback)
config
- the load configcallback
- the callbackprotected java.lang.Object newLoadConfig()
protected void onLoadFailure(java.lang.Object loadConfig, java.lang.Throwable t)
loadConfig
- the load configt
- the exceptionprotected void onLoadSuccess(java.lang.Object loadConfig, D data)
loadConfig
- the load configdata
- dataprotected java.lang.Object prepareLoadConfig(java.lang.Object config)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |