Question

I'm using a CellTable with a Page and an Asynchronous DataProvider. Everthing works fine expect, the "last Page" button of the page is disabled. This may be because of the Asynchronous DataProvider, could deliver additional data, and therefore doesn't know how many records he will have and what the last page is. However I know when the data delivery is finished, so then I could display the last page.

How can I tell the Asynchronous DataProvider, that there is no more data and he should display the last page Button?

BR, Stefan

Was it helpful?

Solution

I had the same problem, using a SimplePager with uiBinder. The default constructor for SimplePager shows a forward button, not a last page one...

I then use @UiField(provided=true) for the SimplePager, and use the following constructor:

pager = new SimplePager(TextLocation.LEFT, (Resources) GWT.create(SimplePager.Resources.class), false, 0, true);

which match:

public SimplePager(TextLocation location,
  Resources resources, boolean showFastForwardButton,
  final int fastForwardPages, boolean showLastPageButton) 

OTHER TIPS

Did you try to set the exact flag in the updateRowCount(count,exact) function to true?

Also make sure that you call the update function in this order:

setRowCount(length, true);
setRowData(0, data);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top