Vaadin
Release Notes
Version 2.10.1
Version Updates
The following versions have been updated:
| Dependency | New version | Previous version |
|---|---|---|
25.2.3 (Release Notes) |
25.2.1 |
|
Karibu |
2.7.1 |
2.7.0 |
JUnit |
6.1.2 (Release Notes) |
6.1.1 |
Components, UI Annotations and Aspects
-
@UIOpenDialogButton: dialog can now be shown conditionally
The annotated method may now returnnullto indicate that no dialog should be opened under certain conditions. In this case, the binding context is still updated.
Version 2.10.0
The release notes contain changes compared to version 2.9.0.
Version Updates
The following versions have been updated:
Dependency |
New version |
Previous version |
Vaadin |
25.2.1 (Release Notes) |
24.9.8 |
Faktor-IPS |
26.7.0.release (Release Notes) |
26.1.0.release |
Karibu |
2.7.0 |
2.5.0 |
Spring Boot compatibility tested for |
4.1.0 (Release Notes) |
3.5.9 |
Spring Framework |
7.0.8 (Release Notes) |
6.2.15 |
JUnit |
6.1.1 (Release Notes) |
5.14.2 |
Vaadin 25 Update
The update to Vaadin 25 not only brings an update of the tech stack, but also changes in build configuration and frontend styling.
Below are the most notable changes for linkki applications. For a complete list of Vaadin 25 breaking changes and migration steps, please refer to the Vaadin 25 Upgrade Guide.
Technical compatibilities
-
Spring Boot 4
Vaadin 25 uses Spring Boot 4.1+ and Spring Framework 7. This is a major version jump from Spring Boot 3.5. Please refer to Spring Boot 4.0 Migration Guide for more information. -
JakartaEE 11
Vaadin 25 is compatible with Jakarta EE 11. -
Node.js
Frontend builds now require Node.js 24 or later for development. -
JUnit
All linkki test libraries now use JUnit 6. Apart from the Java 21 requirement, which is already mandatory since linkki 2.8, there should be no breaking API changes.
For detailed changes and improvements, see JUnit 6 release notes.
If you encounter any incompatibilities while using JUnit 5, please don’t hesitate to contact us. -
Selenium
Vaadin TestBench now uses Selenium 4.39.0.
Build and dependencies
-
Maven configuration
The default in new projects is thatmvn installbuilds a production artifact without needing a production profile.For development features,
com.vaadin/vaadin-devcan be included as a dependency withoptionalscope. This module includes features that make the development faster such as live-reload. The server also sends more data to the browser to help troubleshoot problems in the server client communication. More details can be found in the Vaadin documentation.Migration: For JEE projects, no changes are needed.
In Spring Boot projects, following changes should be made in allpom.xmlthat usevaadin-maven-plugin:-
Profile
productionshould be removed. -
vaadin-maven-pluginshould always call the goalbuild-frontend. Goalprepare-frontendshould be removed. -
Add the following dependency:
<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-dev</artifactId> <optional>true</optional> </dependency>
-
-
Jackson for JSON handling
Vaadin 25 replaced the deprecatedelemental.jsonlibrary with Jackson for JSON handling.
Migration: This is an internal change in Vaadin and should not affect linkki applications directly, but may impact custom components using Vaadin’s JSON APIs. -
Less transitive dependencies
Some dependencies do not come with Vaadin anymore. If those dependencies are needed, they need to be included explicitly. Some well-known ones include:-
Guava: Google Core Libraries
-
Apache Commons Compress
Migration: Check if these dependencies are really required and include them as dependencies explicitly if needed.
-
Notable Java API Changes
-
Label component deprecation
com.vaadin.flow.component.html.Labelhas been deprecated as the naming is confusing, making the component often misused in cases, where a<label>element should not be used.
Migration: To ensure that<label>should really be used, check if the usage is correct according to the specification.
If this is the case, usecom.vaadin.flow.component.html.NativeLabelinstead.
If the usage does not match the specification, use a different element such asTextorSpaninstead. -
Renaming of variant constants
With the introduction of a new theme, variants that only work with Lumo theme are renamed, e.g.DetailsVariant.FILLEDtoDetailsVariant.LUMO_FILLED.
Migration: Check the deprecation Javadoc and replace the constants accordingly.
-
Vaadin now uses Jackson for all JSON functionalities. Due to compatibility issues, Spring Boot 4.0.4 or later is now required.
-
Variants that work in both Aura and Lumo themes are now renamed, e.g.
ButtonVariant.LUMO_PRIMARYwas renamed toButtonVariant.PRIMARY. -
In Testbench, methods
first()andwaitForFirst()are now deprecated and marked for removal. (Vaadin issue)-
For
first(): replacing withsingle()may not always suffice — consider usingid(), making the query context more specific, or usingall().getFirst()(especially in tables where multiple elements are expected). -
For
waitForFirst(): replace withsingle()directly, or usewaitUntilwithVaadinElementConditions.elementDisplayed.
-
-
TreeDataProvideris no longer returned byTreeGrid#getDataProvider(). Tree data must now be accessed viaTreeGrid#getTreeData()directly.
Migration: Replace any cast ofTreeGrid#getDataProvider()toTreeDataProviderwith a direct call toTreeGrid#getTreeData().
Frontend Changes
-
NotificationUtilinfo notifications no longer apply theinfotheme
Vaadin 25 introduced its owninfotheme variant for notifications with a visual style that differs from the linkki notification styling. To avoid unintended visual changes, info notifications created byNotificationUtilno longer apply theinfotheme name. Warning and error notifications are unaffected and continue to use Vaadin’swarninganderrortheme variants. See Notifications documentation for more information. -
Stylesheets
The annotation@Themeis deprecated. Instead, themes are loaded by@StyleSheet.
For the linkki theme and the F10 theme, a newSTYLESHEETconstant was added toLinkkiThemeandF10ProductTheme.
Migration:-
Replace existing
@Themedeclarations for linkki or f10-product theme with@StyleSheet(LinkkiTheme.STYLESHEET)or@StyleSheet(F10ProductTheme.STYLESHEET). -
Make sure that the class that is annotated with
StyleSheetis indeed covered by the value of@EnableVaadin. -
Custom themes should be migrated accordingly:
-
If the custom theme is not reusable, consider moving
/themes/mytheme/styles.cssto/mytheme/styles.css, which is the location recommended by Vaadin. -
If the custom theme can be used by downstream projects, and do not need to support usage with
@Theme, consider moving/themes/mytheme/styles.csstomytheme/mytheme.css.
-
-
Consider adjusting the usage of
@CssImport: If the annotation is not used to import a style sheet from a npm package, consider importing the stylesheet onAppShellConfiguratordirectly with@StyleSheet, and move it tosrc/main/resources/META-INF/resources. Alternatively, consider importing the stylesheet in CSS with@import. This makes it easier to understand which stylesheets are included by having all stylesheets at one place. For more details, see Vaadin documentation.
-
-
Shadow DOM injection deactivated by default
Shadow DOM injection is no longer activated by default. All shadow DOM injections in linkki theme are migrated. Migration: For any existing shadow DOM injections, consider migrating them by using:partselector instead. Vaadin documentation provides common CSS selectors for most components, see e.g. documentation for Grid.
If shadow DOM injection is still needed, the feature flagthemeComponentStylesmust be set to activate the feature. Note that the property must be declared in the web application module directly. -
Aura theme
Vaadin introduces the new Aura theme that coexists with Lumo. Note that the linkki theme does not work with Aura theme at the moment. -
DOM changes
Some web components are reworked in this version, most notably overlays (including dialogs). Methods provided by the linkki TestBench extension such as$(OkCancelDialogElement.class)are adjusted accordingly. Other selectors used in UI tests and CSS styling may need to be adjusted. -
Scrolling in SplitLayouts
In Vaadin 25, the scrolling behavior ofSplitLayoutwas changed deliberately. Primary and secondary components do not scroll automatically anymore.Check all existing usages of SplitLayoutif the scrolling behavior is still correct. If the primary and secondary component should scroll, it may be necessary to addoverflow: autoto the components. This can be done withLumoUtility.Overflow.AUTOorgetStyle().setOverflow(AUTO).
If the split layout is in a flex container, it may also be necessary to addmin-height: 0to theSplitLayoutitself. -
Styling of Grids changed
The styling of vaadin-grid elements has changed. This may break custom selectors that apply styling to grids.
Vaadin Release Notes and Migration Guide
For all changes in Vaadin, see Vaadin release notes for Version 25.0.0, Version 25.1.0, Version 25.2.0 as well as the Vaadin 25 migration guide.
Components, UI Annotations and Aspects
-
New components for displaying validation messages
A newMessagesPanelcomponent is introduced to display a list of messages. It can be used standalone or within the newMessagesSplitLayout, which combines a content component with a collapsible message panel. InMessagesSplitLayout, the message panel is automatically hidden when no messages are present and is shown when messages are available.
The utility classMessageUiComponentswas extended with a method that creates aMessagesPanelthat displays the validation messages after validation automatically.
Another new methodhandleMessagesAfterValidationcan be used with aMessagesSplitLayoutto update split position additionally.
New documentation is added accordingly, see section Message Components.
Migration:-
Check existing usages of
MessageUiComponents#createMessageTable:-
If the component should only update after validation, consider using
createValidationMessagesPanelinstead. -
If the component does not need any update, consider using
MessagesPaneldirectly.
-
-
If a custom
SplitLayoutwas used to display validation messages in the secondary component, consider migrating toMessagesSplitLayout(see documentation).
-
-
New convenience constructor for
InfoToolsComponent
A new constructorInfoToolsComponent(Sequence<T> tools)has been added that opens all tools by default. The existing constructorInfoToolsComponent(Sequence<T> tools, Sequence<T> defaultTools)remains available for cases where only a subset of tools should be open by default. -
UIBadge
A new annotation@UIBadgehas been added to create badges for displaying visually highlighted information. For more information see UIBadge. -
Support for additional components in Headlines
The existing annotationUIHeadlinehas been extended and can now be used on methods returning either a String or aHeadlinePmo. AHeadlinePmocan be used as return value if additional components should be added to the title or at the end of the headline. These components can be provided as PMOs to theHeadlinePmo.
Components added using the additional PMOs are updated within the same binding context in which the headline is created.Alternatively,
HeadlinePmocan also be used directly withVaadinUiCreatorto create a Headline.For more detailed information, see documentation of
UIHeadline.For headlines that are created as Vaadin components, a new method
addToTitle(Component)can be used to add components directly behind the title. -
Adding components to the title component of a headline
Components can now be added directly into the<h2>element using the new methodHeadline#addToTitle(Component). Components added via this method are preserved whensetTitle()is called. -
UIDateField and UIDateTimeField are no longer created with clear button by default
In version 2.9.0,UIDateFieldandUIDateTimeFieldcreate components with a clear button by default. This change is reverted based on the common feedback that the clearing of the value triggers unnecessary calculations and validations. To add a clear button to these fields, the new@BindClearButtonannotation can be used. -
@UIMultiSelect: new attributeautoExpand
The new attributeautoExpandof typeMultiSelectComboBox.AutoExpandModeallows configuring the automatic expansion of the field when many chips are selected. The default value isNONEfor backwards compatibility. -
@UIMultiSelect: new attributeselectedItemsOnTop
The new attributeselectedItemsOnTopcan be set to move selected items to the top of the dropdown list. The default value is false for backwards compatibility. -
BindClearButton
A new aspect annotation @BindClearButton has been added to set the clear button visible on UI components that implementHasClearButtoninterface. -
BindValueChangeMode
A new annotation@BindValueChangeModehas been added to allow processing the value of a field while still typing, which for example can make search fields more responsive. For more information see BindValueChangeMode
Testing
-
Better support for dialogs in Testbench tests
Two new methods have been added toVaadinElementConditions:dialogClosed(String title)waits until no dialog with the given title is open andallDialogsClosed()waits until all dialogs are closed. In addition, all methods inOkCancelDialogElementare improved for the case that multiple dialogs are opened.
Migration: Consider using$(OkCancelDialogElement.class)instead of$(DialogElement.class)wherever applicable. -
Support for multiple deployments in Testbench tests
WebDriverExtensionnow accepts asystemNameparameter that scopes all DriverProperties lookups to individual system properties. For example, aWebDriverExtensioncreated withsystemName"systemA"readstest.hostname.systemA,test.port.systemA, andtest.protocol.systemAinstead of the defaulttest.hostnameetc. This allows different test classes to target different deployments without interfering with each other. -
TestBench Extension: better handling of exceptions from WebDriver
SessionNotCreatedExceptionthat can occur during driver creation are now retried. In addition, web drivers inWebDriverExtensionare now thread local, which should reduceNoSuchSessionException, improving the stability of parallel UI tests executions. -
TestBench Extension: support testing for browser alert
With Chromedriver 126+, chrome driver automatically consumes alerts created duringonbeforeUnloadwhich is used inHasBrowserConfigurationwhen executed in headless mode. This makes it impossible to test these scenarios. In this version, additional options are added to the chrome driver that start with linkki TestBench extension. This makes it possible to test for browser alert again, e.g. usingExpectedCondition.alertIsPresent.
Other Improvements
-
APT validation for @BindClearButton
The annotation processor now ensures that@BindClearButtonis only used with non-primitive return types, as the clear button requires nullable values. -
Documentation on limitations of unit UI testing with Karibu Documentation was added to make limitations of unit UI testing with Karibu more clear. See section "Limitations of Karibu" in chapter "Unit UI testing with Karibu-Testing".
-
Remove of linkki internal shadow DOM injections
All internal shadow DOM injections that are used by linkki theme are removed. Shadow DOM injection is deactivated by default in Vaadin 25. If shadow DOM injections are used currently, consider removing them and use selectors such aspartinstead.
This change should not cause any visual breaks. If you encounter any unexpected styling or UI test problems, please don’t hesitate to contact us. -
Removal of deprecated
getSectionContent()inLinkkiSection,BaseSectionandGridSection
The methodgetSectionContent(), deprecated since 2.0.0, has been removed. UsegetContentWrapper()instead. -
ColumnTextAlignAspectDefinitionandColumnSortableAspectDefinitionmoved totable/column/aspects
Both classes have been moved fromorg.linkki.core.ui.table.aspectstoorg.linkki.core.ui.table.column.aspectsas other aspects for table columns are also there. -
logback-test.xmlinlinkki-vaadin-flow-testbench-extensionno longer affects downstream projects
Thelogback-test.xmlwas packaged into the JAR withroot level="TRACE", causing excessive logging in downstream projects. The file has been removed and is no longer included in the JAR. Downstream projects have to provide their own logging configuration now, if required.
Bugfixes
-
linkki-apt validation for all linkki annotations
linkki-apt can now fully validate usages of all linkki standard annotations. -
Exceptions for Comboboxes in Grids
Comboboxes in Grids were causing exceptions during lazy-loading. This was fixed for projects using the application framework. Projects that imported the focus-first scripts for ComboBoxes manually, must remove the@JsModulecall to importfocus-first-item-combo-box-scroller.js.
Bugfixes
-
TreeGrid in Grid cell did not render content until user interaction
A Vaadin regression causedTreeGridcomponents used insideGridcomponent columns to not display their content after the page loads. Content only appeared after the user interacted with the Grid (e.g. sorting a column). This is fixed by the Vaadin update to 25.2.3.