final int cols = colids.length;
final int pagelen = getPageLength();
int firstIndex = getCurrentPageFirstItemIndex();
- int rows = size();
+ int rows, totalRows;
+ rows = totalRows = size();
if (rows > 0 && firstIndex >= 0) {
rows -= firstIndex;
}
}
Object id;
if (firstToBeRenderedInClient >= 0) {
- if (firstToBeRenderedInClient < size()) {
+ if (firstToBeRenderedInClient < totalRows) {
firstIndex = firstToBeRenderedInClient;
} else {
- firstIndex = size() - 1;
+ firstIndex = totalRows - 1;
}
} else {
// initial load
firstToBeRenderedInClient = firstIndex;
}
- if (size() > 0) {
- if (rows + firstIndex > size()) {
- rows = size() - firstIndex;
+ if (totalRows > 0) {
+ if (rows + firstIndex > totalRows) {
+ rows = totalRows - firstIndex;
}
} else {
rows = 0;