Merge from trunk 10962

This commit is contained in:
Yuriy Artamonov 2013-03-28 15:00:04 +00:00
parent 6a8cc84068
commit d967585f9a

View File

@ -306,6 +306,14 @@ public class DataWorkerBean implements DataWorker {
// to ensure correct paging
int requestedMax = context.getQuery().getMaxResults();
if (requestedMax == 0) {
ArrayList result = new ArrayList(set.size());
result.addAll(set);
// set contains all items if query without paging
return result;
}
int setSize = list.size() + requestedFirst;
int factor = list.size() / set.size() * 2;