Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT SimplePager - LastPageButton disabled?

Tags:

gwt

In GWT when using SimplePager the LastPage button is disabled - but why?

See example in section: "Adding Paging Controls" http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html

If you copy the sample in and run it, you will see that the LastPageButton is disabled?

Thanks

like image 349
Chris G. Avatar asked Jul 28 '11 10:07

Chris G.


1 Answers

It's not the LastPageButton, but the FastForward Button, which is disabled because the constructor used to initialize the pager sets it to a value that it will be enabled if the remaining number of items is larger than 1000 (and the example contains only 200 items, just increase it to 2000 to see it). There is a LastPageButton, but in the constructor used in the example disables it. You can enable the LastPageButton by using the following constructor to initialize the pager:

  public SimplePager(TextLocation location, Resources resources, boolean showFastForwardButton,
      final int fastForwardRows, boolean showLastPageButton)
like image 125
Hilbrand Bouwkamp Avatar answered Oct 16 '22 14:10

Hilbrand Bouwkamp