fixed the issue with repeated results
This commit is contained in:
parent
2ecf6ff435
commit
c840034094
@ -46,6 +46,10 @@ public class ProjectIdeaDataProvider extends SortableDataProvider<ProjectIdea>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Iterator<ProjectIdea> iterator(int first, int count) {
|
public Iterator<ProjectIdea> iterator(int first, int count) {
|
||||||
|
|
||||||
|
params.setLimit(count);
|
||||||
|
params.setOffset(first);
|
||||||
|
|
||||||
Iterator<ProjectIdea> itr;
|
Iterator<ProjectIdea> itr;
|
||||||
itr = ((ProjectIdeaDao) getDao()).findProjectIdeas(params).iterator();
|
itr = ((ProjectIdeaDao) getDao()).findProjectIdeas(params).iterator();
|
||||||
|
|
||||||
@ -59,6 +63,8 @@ public class ProjectIdeaDataProvider extends SortableDataProvider<ProjectIdea>{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int size() {
|
public int size() {
|
||||||
|
params.setLimit(null);
|
||||||
|
params.setOffset(null);
|
||||||
return (int) ((ProjectIdeaDao) getDao()).countProjectIdeas(params);
|
return (int) ((ProjectIdeaDao) getDao()).countProjectIdeas(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user