To do that,we need just need to use RpcProxy and override the load method.
Anyway, I put the sample code below.
I take it from GXT demo code.
final ExampleServiceAsync service = (ExampleServiceAsync) Registry.get(Examples.SERVICE);
RpcProxy<PagingLoadResult<Post>> proxy = new RpcProxy<PagingLoadResult<Post>>() {
@Override
public void load(Object loadConfig, AsyncCallback<PagingLoadResult<Post>> callback) {
service.getPosts((PagingLoadConfig) loadConfig, callback);
}
};
// loader
final PagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy);
loader.setRemoteSort(true);
ListStore<Post> store = new ListStore<Post>(loader);
1 comments:
can you provide full example ..
Post a Comment