Friday, May 31, 2013

Re: SimplePager last page issue

These methods are private in 2.5.1, so this fix does not work there.

The behavior to only set enabled/disabled on next/last seems broken. I have rangeLimited(false) and always have exact row count, and the enablement on my next/last paging controls can never be updated.


On Tuesday, October 16, 2012 10:18:46 AM UTC-4, Juan Pablo Gardella wrote:
Hi,

See http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/cellview/client/SimplePager.java these methods are defined in a super class.

Juan

2012/10/16 dafintrash <dafin...@gmail.com>
Your tip could use some clarification as the SimplePager class doesn't have the following methods: setPrevPageButtonsDisabled, setNextPageButtonsDisabled, setFastForwardDisabled.


On Monday, August 27, 2012 4:11:25 AM UTC+3, Juan Pablo Gardella wrote:
Hi,

There is a bug with SimplePager that enable go to next page in the last page (an must be disabled). Well, after some debugging if I change the method onRangeOrRowCountChanged() in this way works well.

@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()) {
    if (isRangeLimited() || display.isRowCountExact()) { 
      setNextPageButtonsDisabled(!hasNextPage());
      setFastForwardDisabled(!hasNextPages(getFastForwardPages()));
    }
  }

As see, I remove "!" in display.isRowCountExact() and works. Hope helps someone.

Juan

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/pnTXCInn1bwJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment