Given these codes:
private ListDataProvider<String> cellListDataProvider = new ListDataProvider<String>();
public void onLoadingData(){
mySimplePager.setDisplay(myCellList);
mySimplePager.setPageSize(3);
cellListDataProvider.addDataDisplay(myCellList);
}
//There is a button & when clicking that button , it will call
public void resetData(){
cellListDataProvider.getList().clear();
mySimplePager.setPageSize(0); ///--> dot no help
}
Now after calling resetData()
then the CellList
was disappeared, but the SimplePager still shows the text 1-1 of 0
, which doesn't make any sense. I tried to clear that text by using mySimplePager.setPageSize(0);
but nothing happened unless I refresh the page.
So How to clear the Text "1-1 of 0" in SimplePager (GWT)?
What I did is just to set the pager visibility to false when the count is 0, it will hide the whole pager.