
How to Use Vaadin Grid With Lazy Loading for Large Data
Load a Vaadin Grid page by page from a database with a callback data provider, add sorting and filtering, and avoid loading every row into memory.
Tag
223 posts

Load a Vaadin Grid page by page from a database with a callback data provider, add sorting and filtering, and avoid loading every row into memory.

Bind form fields to a bean with Vaadin's Binder, add required checks and custom validators, show errors per field and save only when the data is valid.

Theme a Vaadin application: choose Lumo or Aura, change design tokens with CSS custom properties, add a custom theme folder and style components with parts.

Use Vaadin Push to update the UI from background threads: enable Push on the app shell, wrap changes in ui.access, and handle detach and long running tasks.

Secure a Vaadin Flow application with Spring Security: the VaadinWebSecurity base, a login view, view access annotations and logout, with form login.

Keep Vaadin server memory in check: what lives in the VaadinSession and UI, how heartbeats close dead UIs, what to put in grids and how to find leaks.

Build a Vaadin application for production with the production profile, produce the frontend bundle, package a jar or image and verify it.

Use multi-stage Docker builds to compile a Java application in a JDK stage and ship only the jar in a JRE stage, with caching for Maven and Gradle.

Prevent cross-site scripting in Java web apps with context-aware output encoding, safe template settings, a Content Security Policy and sanitizing rich text.

Stop path traversal by resolving user-supplied names against a base directory, normalizing and checking the result, and avoiding user input in paths.

Reproduce a lost update in JPA with two transactions, then fix it with a version column, an atomic update query or a pessimistic lock, and test the conflict.

Log SQL in Hibernate with the right categories, show bind parameters, count statements with statistics and avoid the show_sql pitfalls in production.