fixed the issue with repeated results

This commit is contained in:
Fredrik Friis 2012-02-28 11:17:22 +09:00
parent 2ecf6ff435
commit c840034094

@ -46,6 +46,10 @@ public class ProjectIdeaDataProvider extends SortableDataProvider<ProjectIdea>{
}
public Iterator<ProjectIdea> iterator(int first, int count) {
params.setLimit(count);
params.setOffset(first);
Iterator<ProjectIdea> itr;
itr = ((ProjectIdeaDao) getDao()).findProjectIdeas(params).iterator();
@ -59,6 +63,8 @@ public class ProjectIdeaDataProvider extends SortableDataProvider<ProjectIdea>{
@Override
public int size() {
params.setLimit(null);
params.setOffset(null);
return (int) ((ProjectIdeaDao) getDao()).countProjectIdeas(params);
}