changed iterator count to make pagination works properly

This commit is contained in:
Emil Siverhall 2012-05-08 11:01:10 +02:00
parent 333d8f49f3
commit 918eeb5c51

@ -105,7 +105,10 @@ public class CheckListTemplateDataPanel extends Panel {
sort = new Sort(Sort.Direction.DESC, getSort().getProperty());
}
// new Sort(Sort.Direction.ASC, getSort().toString())
return checklistTemplateService.find(filterString, new PageRequest(table.getCurrentPage(), count, sort)).iterator();
//Changed from count to table.getRowsPerPage to make pagination work.
//return checklistTemplateService.find(filterString, new PageRequest(table.getCurrentPage(), count, sort)).iterator();
return checklistTemplateService.find(filterString, new PageRequest(table.getCurrentPage(), table.getRowsPerPage(), sort)).iterator();
}
@Override