O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lazy loading in a table

When we work with tables, we often want to load rows quickly, no matter how big the tables are. In tables with a few rows, it isn't problem, but when we have thousands of rows, it can freeze the web browser. For such cases, there is support for lazy loading in Vaadin's tables. Lazy loading means that rows are loaded later. Table loads only the visible rows plus some rows are buffered for scrolling. The rest of the rows are loaded on demand.

In this recipe, we will create a table with ten thousand rows. It's big table, but as shown in the following screenshot, only the required part of the table is loaded. When we scroll to the rows that are not loaded, we will see an empty table with a row number range which will be loaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required