Hi,
The PagingToolBar does not work in 2.0.1 using an XmlPagingLoadResultReader.
The protected method createReturnData should be overriden in XmlPagingLoadResultReader so that the PagingLoadResult object instance returned has a correct offset value.
This offset value is used in the PagingToolBar onLoad(LoadEvent e) method to recalculate the
activePage.
The proposed fix is to implement with an override the method createReturnData in XmlPagingLoadResultReader with
Code:
@Override
protected Object createReturnData(Object loadConfig, List<ModelData> records, int totalCount) {
Object result = super.createReturnData(loadConfig, records, totalCount);
if (result instanceof PagingLoadResult) {
PagingLoadResult<?> r = (PagingLoadResult<?>) result;
r.setTotalLength(totalCount);
r.setOffset(((PagingLoadConfig)loadConfig).getOffset());
}
return result;
}
Bruno
www.amalto.com