code: @Override
      protected void onRangeChanged(HasData<RecordList.Record> display) {
  
          // Get the new range required.
          range = display.getVisibleRange();
          //if it is the last page don't load more results
          if(display.getRowCount()%range.getLength()!= 0 && display.getRowCount() > 0 && range.getStart() > previousRange.getStart()){
              display.setVisibleRange(previousRange.getStart(), previousRange.getLength());
          }
  
          updateResults(range.getStart(), range.getLength());
          previousRange = range;
      }
docs: {@link #onRangeChanged(com.google.gwt.view.client.HasData)} is called when the table requests a new
  range of data. You can push data back to the displays using
  {@link #updateRowData(int, java.util.List)}.