The cell table pagination is behaving weirdly. check the example from GWT http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable
The page size here is defined as 15. This is the problem-
I am having same issue in my project. Is there any fix for this ??
This is a known, reported bug. As mentioned in that bug report, there is a workaround:
As workaround, one can subclass SimplePager in order to override this behaviour defined in method setPageStart:
@Override public void setPageStart(int index) { if (this.getDisplay() != null) { Range range = this.getDisplay().getVisibleRange(); int pageSize = range.getLength(); // if (isRangeLimited && display.isRowCountExact()) { // index = Math.min(index, display.getRowCount() - pageSize); // } index = Math.max(0, index); if (index != range.getStart()) { this.getDisplay().setVisibleRange(index, pageSize); } } }
When you make the pager initialization you must set:
pager.setRangeLimited(false);
This method sets whether or not the page range should be limited to the actual data size.
If true, all operations will adjust so that there is always data visible on the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With