With the upcoming Vaadin 24.7 release, we’re introducing a couple of minor but impactful enhancements that embody our mission: making Java-based web development simpler and more productive.
One of the key improvements in this release is an enhancement to the Grid
API, allowing developers to seamlessly integrate with backend methods utilizing Spring Data’s Pageable
in their API, eliminating boilerplate code, and making lazy-loaded data binding even more intuitive. There is a similar enhancement for ComboBox
. The change makes it effortless to bind Vaadin’s Grid
to Spring Data-based backends using Spring Data's Pageable
instead of Vaadin's Query
. This improvement simplifies the data-binding process by letting you pass a Pageable
function directly instead of manually converting queries.
From boilerplate to simplicity
Previously, integrating Spring Data with Vaadin’s Grid
required a bit more ceremony. A typical implementation involved transforming a VaadinQuery
into a Spring Pageable
request and then manually streaming the results, as shown below:
setItems(vaadinQuery -> {
var springPageRequest = VaadinSpringDataHelpers.toSpringPageRequest(vaadinQuery);
return service.findPersons(springPageRequest).stream();
});
Now, in Vaadin 24.7, the new API enables a much cleaner approach:
setItemsPageable(pageable -> service.findPersons(pageable));
This improvement makes the Grid
API more natural to use when working with Spring Data repositories, reducing friction and making pagination effortless.
There is no Spring lock-in: Works beyond Spring Data
While this enhancement leverages Spring Data for those who use it, we understand that Vaadin developers work in diverse environments, from plain Java SE with servlet containers to Quarkus and beyond. That’s why this feature is entirely optional—if you don’t use Spring Data, your existing setup remains unchanged, and Vaadin 24.7 won't pull in extra dependencies to your project. Vaadin’s Grid
API is already designed to be flexible, allowing you to implement custom data providers regardless of the backend technology you choose.
What’s next? Your feedback shapes the future
This update is just one example of how we continually refine Vaadin to better support real-world developer workflows. But we don’t want to stop here!
We’d love to hear from the Vaadin community:
- Which other APIs would benefit from similar “native helpers”?
- Would, e.g., a Jakarta Data integration be useful for you?
- Are there other improvements we could make to streamline your development process?
Join the conversation in the Vaadin forum or drop a comment below. Let’s shape the future of Vaadin together!
Vaadin 24.7 is coming soon—stay tuned for more enhancements that make full-stack Java development even more delightful!