public class PagingBeanModelGridExample extends LayoutContainer {
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
final ExampleServiceAsync service = (ExampleServiceAsync) Registry.get(Examples.SERVICE);
if (service == null) {
MessageBox box = new MessageBox();
box.setButtons(MessageBox.OK);
box.setIcon(MessageBox.INFO);
box.setTitle("Information");
box.setMessage("No service detected");
box.show();
return;
}
FlowLayout layout = new FlowLayout(10);
setLayout(layout);
RpcProxy<PagingLoadResult<BeanPost>> proxy = new RpcProxy<PagingLoadResult<BeanPost>>() {
@Override
public void load(Object loadConfig,
AsyncCallback<PagingLoadResult<BeanPost>> callback) {
service.getBeanPosts((PagingLoadConfig) loadConfig, callback);
}
};
// loader
final BasePagingLoader<PagingLoadResult<ModelData>> loader = new BasePagingLoader<PagingLoadResult<ModelData>>(