0
votes

I am working on a CellTable with a SimplePager. My paging works fine in the sense when i set the page size to be 5 only 5 records are being displayed. My question is that do next and previous buttons come by default or do we have to configure them. I have seen the show case example code and i do not see any external configurations . my SimplePager code is as follows:

//create pager

SimplePager.Resources resources = GWT.create(SimplePager.Resources.class); 
SimplePager simplePager = new SimplePager(TextLocation.CENTER, resources , false, 0, true);
simplePager.setDisplay(cellTableSearchResults);
simplePager.setPageSize(5);

// create data provider
ListDataProvider<GridDTO> dataProvider = new ListDataProvider<GridDTO>();
dataProvider.addDataDisplay(cellTableSearchResults);
dataProvider.setList(components);

Please help.

2

2 Answers

1
votes

SimplePager is a widget containing those buttons. Did you simply forgot to display it?

0
votes

Set page size to celltable by cellTable.setPageSize(5); Don't set simplepagers page size simplePager.setPageSize(5);

this will split cell table to show 5 rows as visible Items.