| java.lang.Object net.mygwt.ui.client.util.Observable net.mygwt.ui.client.data.DataLoader
DataLoader | public class DataLoader extends Observable implements Loader(Code) | | DataLoaders are used to retrieve and convert raw data. Data is
retrieved using a DataProxy and optionally read and parsed
using a DataReader .
- Events:
- BeforeLoad : (loader, config)
Fires before a load operation. Listeners can set the doit
field to false to cancel the action.
- loader : this
- config : the load config
- Load : (loader, config, result)
Fires after the button is selected.
- loader : this
- config : the load config
- result : the load result
- LoadException : (loader, config, result)
Fires after the button is selected.
- loader : this
- config : the load config
- result : the load result
See Also: DataProxy See Also: DataReader |
Field Summary | |
public int | totalLength totalLength specifies the total number of records which may not equal the
local elements when using paging. |
totalLength | public int totalLength(Code) | | totalLength specifies the total number of records which may not equal the
local elements when using paging.
|
DataLoader | public DataLoader(DataProxy proxy)(Code) | | Creates a new loader instance with the given proxy. A reader is not
specified and will not be passed to the proxy at load time.
Parameters: proxy - the data proxy |
DataLoader | public DataLoader(DataProxy proxy, DataReader reader)(Code) | | Creates a new loader with the given proxy and reader.
Parameters: proxy - the data proxy Parameters: reader - the data reader |
getData | public Object getData()(Code) | | Returns the last data from the last load.
the remote data |
getRemoteSort | public boolean getRemoteSort()(Code) | | |
getSortDir | public int getSortDir()(Code) | | |
getTotalLength | public int getTotalLength()(Code) | | |
load | public void load()(Code) | | Loads the data.
|
load | public void load(int start, int limit)(Code) | | Loads the data using the specified start and limit parameters.
Parameters: start - the start mark Parameters: limit - the limit mark |
reload | public void reload()(Code) | | Reloads using the last load config.
|
setRemoteSort | public void setRemoteSort(boolean remoteSort)(Code) | | Sets if sorting is handled by the server. Defult value is
false .
Parameters: remoteSort - true to enable server side sorting |
setSortDir | public void setSortDir(int sortDir)(Code) | | |
setSortField | public void setSortField(String sortField)(Code) | | |
|
|