com.extjs.gxt.ui.client.data
Interface Loader<D>

Type Parameters:
D - the data type being returned by the loader
All Superinterfaces:
Observable
All Known Subinterfaces:
ListLoader<D>, PagingLoader<D>, RemoteSortTreeLoader<M>, TreeLoader<M>
All Known Implementing Classes:
BaseListLoader, BaseLoader, BasePagingLoader, BaseRemoteSortTreeLoader, BaseTreeLoader

public interface Loader<D>
extends Observable

Interface for objects that can load remote data.

Events:
BeforeLoad : LoadEvent(loader, config)
Fires before a load operation. Listeners can cancel the action by calling BaseEvent.setCancelled(boolean).
Load : LoadEvent(loader, config, result)
Fires after a load operation.
LoadException : LoadEvent(loader, config, result)
Fires when an exception occurs during a load operation.

See Also:
ListLoader, TreeLoader

Field Summary
static EventType BeforeLoad
          Fires before a request is made for data.
static EventType Load
          Fires when new data has been loaded.
static EventType LoadException
          Fires if an exception occurs while retrieving data.
 
Method Summary
 void addLoadListener(LoadListener listener)
          Adds a load listener.
 boolean load()
          Loads the data using the current configuration.
 boolean load(java.lang.Object loadConfig)
          Loads the data using the given load configuration.
 void removeLoadListener(LoadListener listener)
          Removes a load listener.
 
Methods inherited from interface com.extjs.gxt.ui.client.event.Observable
addListener, fireEvent, getListeners, hasListeners, hasListeners, removeAllListeners, removeListener
 

Field Detail

BeforeLoad

static final EventType BeforeLoad
Fires before a request is made for data.


Load

static final EventType Load
Fires when new data has been loaded.


LoadException

static final EventType LoadException
Fires if an exception occurs while retrieving data.

Method Detail

addLoadListener

void addLoadListener(LoadListener listener)
Adds a load listener.

Parameters:
listener - the listener to add

load

boolean load()
Loads the data using the current configuration.

Returns:
true if the load was requested

load

boolean load(java.lang.Object loadConfig)
Loads the data using the given load configuration.

Parameters:
loadConfig - the load config
Returns:
true if the load was requested

removeLoadListener

void removeLoadListener(LoadListener listener)
Removes a load listener.

Parameters:
listener - the listener to remove