Reputation: 181
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.
Upvotes: 0
Views: 2393
Reputation: 175
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.
Upvotes: 0
Reputation: 64541
SimplePager
is a widget containing those buttons. Did you simply forgot to display it?
Upvotes: 1