|
|||||||||
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>
com.extjs.gxt.ui.client.data.BaseListLoader<D>
com.extjs.gxt.ui.client.data.BasePagingLoader<D>
D
- the PagingLoadResult
type being returned by this
loaderpublic class BasePagingLoader<D extends PagingLoadResult<?>>
Default implementation of the PagingLoader
interface.
Field Summary | |
---|---|
protected int |
limit
|
protected int |
offset
|
protected int |
totalCount
|
Fields inherited from class com.extjs.gxt.ui.client.data.BaseLoader |
---|
lastConfig, proxy, reader, reuseConfig |
Fields inherited from interface com.extjs.gxt.ui.client.data.Loader |
---|
BeforeLoad, Load, LoadException |
Constructor Summary | |
---|---|
BasePagingLoader(DataProxy proxy)
Creates a new paging loader instance. |
|
BasePagingLoader(DataProxy proxy,
DataReader reader)
Creates a new paging loader instance. |
Method Summary | |
---|---|
int |
getLimit()
Returns the current limit. |
int |
getOffset()
Returns the offset of the first record. |
int |
getTotalCount()
Returns the total number of models in the dataset as returned by the server. |
void |
load(int offset,
int limit)
Loads the data using the specified configuration. |
protected java.lang.Object |
newLoadConfig()
Template method to allow custom BaseLoader subclasses to provide their own implementation of LoadConfig |
protected void |
onLoadSuccess(java.lang.Object loadConfig,
D result)
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 |
setLimit(int limit)
Sets the limit size. |
void |
setOffset(int offset)
Sets the offset. |
void |
useLoadConfig(java.lang.Object loadConfig)
Use the specified LoadConfig for all load calls. |
Methods inherited from class com.extjs.gxt.ui.client.data.BaseListLoader |
---|
getSortDir, getSortField, isRemoteSort, setRemoteSort, setSortDir, setSortField |
Methods inherited from class com.extjs.gxt.ui.client.data.BaseLoader |
---|
addLoadListener, getLastConfig, getProxy, isReuseLoadConfig, load, load, loadData, loadData, onLoadFailure, removeLoadListener, setReuseLoadConfig |
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.data.ListLoader |
---|
getSortDir, getSortField, isRemoteSort, setRemoteSort, setSortDir, setSortField |
Methods inherited from interface com.extjs.gxt.ui.client.data.Loader |
---|
addLoadListener, load, load, removeLoadListener |
Methods inherited from interface com.extjs.gxt.ui.client.event.Observable |
---|
addListener, fireEvent, getListeners, hasListeners, hasListeners, removeAllListeners, removeListener |
Field Detail |
---|
protected int offset
protected int limit
protected int totalCount
Constructor Detail |
---|
public BasePagingLoader(DataProxy proxy)
proxy
- the data proxypublic BasePagingLoader(DataProxy proxy, DataReader reader)
proxy
- the data proxyreader
- the data readerMethod Detail |
---|
public int getLimit()
PagingLoader
getLimit
in interface PagingLoader<D extends PagingLoadResult<?>>
public int getOffset()
PagingLoader
getOffset
in interface PagingLoader<D extends PagingLoadResult<?>>
public int getTotalCount()
PagingLoader
getTotalCount
in interface PagingLoader<D extends PagingLoadResult<?>>
public void load(int offset, int limit)
PagingLoader
load
in interface PagingLoader<D extends PagingLoadResult<?>>
offset
- the offset of the first record to returnlimit
- the page sizepublic void setLimit(int limit)
PagingLoader
setLimit
in interface PagingLoader<D extends PagingLoadResult<?>>
limit
- the limitpublic void setOffset(int offset)
PagingLoader
setOffset
in interface PagingLoader<D extends PagingLoadResult<?>>
offset
- the offsetpublic void useLoadConfig(java.lang.Object loadConfig)
BaseLoader.reuseConfig
will be set to true.
useLoadConfig
in class BaseListLoader<D extends PagingLoadResult<?>>
protected java.lang.Object newLoadConfig()
BaseListLoader
newLoadConfig
in class BaseListLoader<D extends PagingLoadResult<?>>
protected void onLoadSuccess(java.lang.Object loadConfig, D result)
BaseLoader
onLoadSuccess
in class BaseLoader<D extends PagingLoadResult<?>>
loadConfig
- the load configresult
- dataprotected java.lang.Object prepareLoadConfig(java.lang.Object config)
BaseListLoader
prepareLoadConfig
in class BaseListLoader<D extends PagingLoadResult<?>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |