Changeset 4752

Show
Ignore:
Timestamp:
06/05/08 11:45:50 (6 months ago)
Author:
matti.tahvonen@…
Message:

fixes #1771

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/com/itmill/toolkit/ui/Table.java

    r4486 r4752  
    11491149            final int pagelen = getPageLength(); 
    11501150            int firstIndex = getCurrentPageFirstItemIndex(); 
    1151             int rows = size(); 
     1151            int rows, totalRows; 
     1152            rows = totalRows = size(); 
    11521153            if (rows > 0 && firstIndex >= 0) { 
    11531154                rows -= firstIndex; 
     
    11631164            Object id; 
    11641165            if (firstToBeRenderedInClient >= 0) { 
    1165                 if (firstToBeRenderedInClient < size()) { 
     1166                if (firstToBeRenderedInClient < totalRows) { 
    11661167                    firstIndex = firstToBeRenderedInClient; 
    11671168                } else { 
    1168                     firstIndex = size() - 1; 
     1169                    firstIndex = totalRows - 1; 
    11691170                } 
    11701171            } else { 
     
    11721173                firstToBeRenderedInClient = firstIndex; 
    11731174            } 
    1174             if (size() > 0) { 
    1175                 if (rows + firstIndex > size()) { 
    1176                     rows = size() - firstIndex; 
     1175            if (totalRows > 0) { 
     1176                if (rows + firstIndex > totalRows) { 
     1177                    rows = totalRows - firstIndex; 
    11771178                } 
    11781179            } else {