Using Table.setCurrentPageFirstItemId


I am working with a Table backed by Lazy Query Container containing tens of thousands of items.

When scrolling away from the top of the list and calling setCurrentPageFirstItemId with an identifier located on top of the table, the item becomes visible as expected. Looking at the internals of the Table object attributes such as firstToBeRenderedInClient and lastToBeRenderedInClient are reset properly.

But after the operation calling setCurrentPageFirstItemId has completed, the browser seems to make a request which causes all items to be loaded from top all the way to the original position. Debugging the operation and looking at Table.changeVariables() it seems to contain values such as:

  • firstToBeRendered=0
  • lastToBeRendered=276

What this means is that Lazy Query Container will load all pages until item #276 is reached. The same thing happens if I jus setCurrentPageFirstItemIndex(0) instead.

The number of visible rows in the table is 28. All rows are of equal height.

Any idea what’s causing these extra calls? I’m using Vaadin 7.3.10.

Thanks for all your help!

Best regards,