You need one more dto-proxy pair which extend PagingLoadResultBean/PagingLoadResult.
1) In backend part you have create the following dto:
public class YourCustomPagingLoadResultBean extends PagingLoadResultBean<Data> {
protected YourCustomPagingLoadResultBean () {
}
public YourCustomPagingLoadResultBean (List<Data> list, int totalLength, int offset) {
super(list, totalLength, offset);
}
}
2) Create proxy for this dto:
@ProxyFor(YourCustomPagingLoadResultBean.class)
public interface YourCustomPagingLoadResultProxy extends ValueProxy, PagingLoadResult<DataProxy> {
@Override
List<DataProxy> getData();
}
3) Change you service to return paging bean:
public YourCustomPagingLoadResultBean getData(int pageNumber, int pageSize) {
...
return new YourCustomPagingLoadResultBean(list, totalLength, offset);
}
4) Request also changes to:
Request<YourCustomPagingLoadResultProxy> getData(int pageNumber, int pageSize);
The DataProxy
you are using looks correct, your paging grid will work after these 4 steps.