Using GWT 2.5.1, SimplePager.java has this method:
@Override protected void onRangeOrRowCountChanged() { HasRows display = getDisplay(); label.setText(createText()); // Update the prev and first buttons. setPrevPageButtonsDisabled(!hasPreviousPage()); // Update the next and last buttons. if (isRangeLimited() || !display.isRowCountExact()) { setNextPageButtonsDisabled(!hasNextPage()); setFastForwardDisabled(!hasNextPages(getFastForwardPages())); } }
Why are the following / last buttons on / off only if the range is limited or if the number of lines is not accurate? I have a pager set to a limited false, and my asynchronous message data provider indicates that the line count is accurate when I update the line count. With this setting, the next / last paging buttons will NEVER be updated!
Am I just using it wrong or is it a mistake?
I worked on the problem by subclassing SimplePager to allow me this block at the bottom of onRangeOrRowCountChanged ():
@Override protected void onRangeOrRowCountChanged() { boolean rangeLimited = isRangeLimited(); super.setRangeLimited(true); super.onRangeOrRowCountChanged(); super.setRangeLimited(rangeLimited); }
source share