It’s unfortunate that my initial experience with GWT’s SimplePager wasn’t very positive. The paging behaviour toward end of the list showed the following:
- For the last page, pager would attempt to request record count at last index + page size. This would cause pager to go index array out of bound. i.e. Let’s say you have 95 records with a page size of 10. The last page’s record index should be 90. If you add page size to it, you get 100. Requesting records between 90 and 100 caused the index array out of bound exception.
- If you use next page button navigate to the last page, it would display the last page in a way that the pager would fill the last page with a number of records the same as page size, no matter how many total records are. This created a very weird user experience. i.e For the same parameters above, you would see records #80-90 on the second to last page and then #85-95 on the last page.
After looking on-line for answers, I came across this thread and it helped me to resolve the issues that I observed above. :)