github vaadin/flow 4.0.0.alpha1
4.0.0.alpha1 - Prerelease for Vaadin 17

latest releases: 24.4.0.beta1, 24.4.0.alpha32, 23.3.30...
pre-release3 years ago

Vaadin Flow 4.0.0.alpha1 is a prerelease of the Java Framework targeted to the upcoming Vaadin 17. (https://maven.vaadin.com/vaadin-prereleases/).

Changes since 3.2.0.alpha7
All changes since 3.1

4.0 Feature Highlights

Exposing a new API for component's data manipulation and lazy data fetching with unknown size #8074, #8052

When binding a collection of data or in-memory DataProvider to a component, one can get a new interface (DataView) for data manipulation such that exporting data, traversing between items, adding item count change listener and more:

GridListDataView<String> listDataView = grid
                .setItems("one", "two", "three");

With this new API it is also possible to set only a data fetch callback to the components with no knowledge of item count (i.e. no count callback needed):

GridLazyDataView<Item> lazyDataView = grid
                .setItems(query -> fakeBackend
                        .generateItems(query.getOffset(), query.getLimit())); 

New mixin interface for components with label definition #3241

HasLabel mixin interface has been added to provide the Components with a setter and getter for a label definition.

Adding a way to mark the fields as required #8551

Made more clear for the developer how to mark a field as required when defining custom field validators in TypeScript Binder API.

Adding a feature to populate the component with any bean #7307, #7308

The methods for setting the whole bean, list or map have been added to Element API. This allows the developer to get rid of multiple setProperty calls for particular bean fields.

Vaadin Maven Plugin enhancements #8603, #8603

Adding a way to specify the node download URL from the Vaadin Maven Plugin and exposing the settings node.version and node.download.

Binder's clear method enhancements #8619

Calling Binder::clear() now resets the default value to 'empty' and clears all validation errors

@PastOrPresent and @FutureOrPresent validation #8684

Broken client-side validation for @PastOrPresent and @FutureOrPresent has been removed (in favor of server-side-only validation).

Default validation message in annotations is passed to client #8385

Default JSR-380 error messages are now used in client-side validators.

Component::addListener registrations have been made idempotent #8506

IllegalArgumentException is not thrown now when calling remove() method multiple times on a Registration returned from Component::addListener (or its derivates).

Binder's error messaging enhancements #8631

Server-side error message now is shown on bound form fields if Binder::submitTo fails.

Other improvements

  • Adding registration for @vaadin/form package #6488
  • Effective tree shaking for @vaadin/form enabled #8680
  • Adding a support for enums in endpoints #8144
  • Adding matrix support to client-side form binding #8582
  • Simplifying the validator result type #8552
    The return type of the Validator::validate() method in record-level validators is now more intuitive to use and does not require including boilerplate / unnecessary properties.
  • Adding a validator is now a synchronous operation #8555
    Adding a several validators on a client side with the Binder::addValidator() is now a synchronous method, so it can be used in synchronous contexts without seeing warnings / errors detected by the IDE (because of no await).
  • Eliminating of the exception thrown when there is no user agent information available #6955
    Address the case when there is no user agent string available in WebBrowser::updateRequestDetails (which can happen if the request comes e.g. from a bot).
  • Destroy external frontend resources install process on JVM exit #8597
    The issue observation was in that pnpm install process kept running after Maven process had been terminated.
  • Servlet request handling terminates immediately if the dev server failed on its startup #8297.

Bugfixes

  • Addressing the issue with setting invisible the element with a LegacyWrapper vaadin/multiplatform-runtime#72
  • Addressing the issue with broken router links #8544
  • Addressing the regression with PreserveOnRefresh #8605
  • Address the issue with redirect on a closed session #8623

Deprecations

  • Using of HasItems interface is gradually replaced by new HasListDataView, HasLazyDataView and HasDataView interfaces.
  • Using of HasDataProvider::setDataProvider is deprecated and new HasListDataView, HasLazyDataView and HasDataView interfaces API are recommended to use.

Don't miss a new flow release

NewReleases is sending notifications on new releases.