Java counterpart of Vaadin Web Components
  • Java 96.7%
  • TypeScript 1.8%
  • JavaScript 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
totally-not-ai[bot] 3a3fed850d
feat: make Grid#isItemSelectable public (#10606)
**Review risk:** two-way door — one Grid method becomes public; no
behaviour change

## Description

`Grid#isItemSelectable(T)` is now public (and `final`). It reports
whether an item passes the predicate set with
`setItemSelectableProvider()`, and returns `true` for all items when no
predicate is set. The selection model can apply further rules to user
selection, such as whether deselection is allowed in single-selection
mode.

Programmatic selection doesn't check that predicate. Applications that
change the selection in response to user actions, for example toggling a
row's selection from an item click listener in multi-select mode, need
to apply the same rule. Until now they had to keep their own reference
to the predicate, because both the predicate getter and this method were
package-private.

The method is `final` because the client-side `selectable` data and the
Select All checkbox visibility read the predicate directly. An override
would make the server and the browser disagree.

Triggered by
https://github.com/vaadin/docs/pull/6188#discussion_r4491471366

## What changed

- `Grid#isItemSelectable(T)`: package-private → `public final`, with
Javadoc and `@since 25.4`. The implementation is unchanged.

## Use case

A multi-select grid lets users toggle a row by clicking it, while
completed orders can't be selected:

```java
grid.setItemSelectableProvider(order -> order.getStatus() != Status.COMPLETE);

grid.addItemClickListener(event -> {
    Order order = event.getItem();
    if (!grid.isItemSelectable(order)) {
        return;
    }
    if (grid.getSelectionModel().isSelected(order)) {
        grid.deselect(order);
    } else {
        grid.select(order);
    }
});
```

## API Changes

### com.vaadin.flow.component.grid.Grid

```java
// Changed: package-private → public final
public final boolean isItemSelectable(T item)
```

## Test summary

- `isItemSelectable` returns `true` without a predicate, follows the
predicate once set, and returns `true` again after the predicate is
cleared.
- Existing Grid and single/multi selection model unit tests pass.

## Type of change

- [ ] Bugfix
- [x] Feature

---------

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vinogradov <[email protected]>
2026-11-06 12:29:07 +00:00
.claude chore: disable Claude Code attribution in commits and PRs (#10570) 2026-11-02 16:06:02 +00:00
.github chore: align code review eligibility with vaadin/docs (#10581) 2026-11-03 12:44:40 +00:00
.mvn chore: use english locale for tests (#1780) 2021-06-09 22:46:21 +03:00
checkstyle chore: configure checkstyle rule that flags usages of UI.setCurrent (#8843) 2026-03-06 13:08:22 +01:00
eclipse chore: Sync eclipse formatting file with Flow (#7010) 2025-01-08 17:38:37 +01:00
flow-components-bom chore: bump com.diffplug.spotless:spotless-maven-plugin from 3.10.4 to 3.11.0 (#10602) 2026-11-06 12:21:31 +00:00
guidelines docs: use single() instead of deprecated first() in IT example (#10564) 2026-11-02 11:53:00 +00:00
integration-tests chore: bump 25.4-SNAPSHOT (#10055) 2026-09-08 13:15:25 +00:00
scripts chore: drop the updatePlatform script (#10338) 2026-10-05 06:46:59 +00:00
shared refactor: convert the context menu connector to TypeScript (#9955) 2026-08-25 13:30:56 +00:00
vaadin-accordion-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-ai-components-flow-parent fix: fill AI form fields with their own numeric type (#10569) 2026-11-06 11:17:50 +00:00
vaadin-app-layout-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-aura-theme-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-avatar-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-badge-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-board-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-breadcrumbs-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-button-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-card-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-charts-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-checkbox-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-combo-box-flow-parent fix: do not reset combo box data communicator twice when opened (#10591) 2026-11-06 09:07:10 +00:00
vaadin-confirm-dialog-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-context-menu-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-crud-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-custom-field-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-dashboard-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-date-picker-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-date-time-picker-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-details-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-dialog-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-field-highlighter-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-flow-components-shared-parent refactor: remove detach check from BeforeClientResponseAction (#10584) 2026-11-06 10:12:28 +00:00
vaadin-form-layout-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-grid-flow-parent feat: make Grid#isItemSelectable public (#10606) 2026-11-06 12:29:07 +00:00
vaadin-grid-pro-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-icons-flow-parent chore: Update NpmPackages Webjars versions (main) (#10554) 2026-11-01 19:50:36 +00:00
vaadin-list-box-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-login-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-lumo-theme-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-map-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-markdown-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-master-detail-layout-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-menu-bar-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-messages-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-notification-flow-parent fix: close notification on detach also when tasks are postponed (#10582) 2026-11-05 08:02:50 +00:00
vaadin-ordered-layout-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-pdf-viewer-flow-parent feat: add toolbar actions to PDF Viewer (#10594) 2026-11-06 12:06:00 +00:00
vaadin-popover-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-progress-bar-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-radio-button-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-renderer-flow-parent chore: generate a Jandex index in the published component modules (#10240) 2026-10-01 08:45:50 +00:00
vaadin-rich-text-editor-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-select-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-side-nav-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-slider-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-split-layout-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-spreadsheet-flow-parent test: wait for spreadsheet headers to render in TestBench helpers (#10608) 2026-11-06 12:26:07 +00:00
vaadin-tabs-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-text-field-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-time-picker-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-upload-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
vaadin-virtual-list-flow-parent chore: Update NpmPackages Webjars versions (main) (#10539) 2026-10-30 08:41:04 +00:00
.dtrack.yml chore: Configure dtrack-maven-plugin for SCA (#2097) 2021-09-07 09:27:09 +02:00
.env.example chore: use .env config to define path to local web components (#7035) 2025-01-13 16:09:25 +01:00
.gitattributes chore: stop enforcing LF line endings by formatter (#4824) 2023-03-28 16:23:03 +02:00
.gitignore refactor: move and type-check upload manager connector (#9958) 2026-08-26 06:45:05 +00:00
.prettierrc chore: format JS connectors with Prettier (#3036) 2022-04-21 10:26:26 +03:00
CLAUDE.md chore: refactor guidelines [skip ci] (#9783) 2026-07-24 08:04:37 +00:00
CONTRIBUTING.md chore: update support links (#6132) 2024-03-15 17:12:38 +01:00
CONVENTIONS.md docs: require single unit test per component property (#10565) 2026-11-06 12:25:47 +00:00
package-lock.json chore: bump qs from 6.15.3 to 6.17.1 (#10571) 2026-11-02 14:48:55 +00:00
package.json chore: update web-test-runner dev dependencies to 1.0.0 (#9711) 2026-07-09 13:51:23 +00:00
pom.xml chore: bump com.diffplug.spotless:spotless-maven-plugin from 3.10.4 to 3.11.0 (#10602) 2026-11-06 12:21:31 +00:00
PULL_REQUEST_TEMPLATE.md chore: add new checkbox to the PR template (#4545) 2023-01-17 12:51:17 +01:00
README.md chore: run unit tests in CI only for changed modules (#9500) 2026-06-12 11:47:24 +00:00

Vaadin Flow Components

This is a maven multi-module project including all vaadin flow components.

main branch is the latest version of all the components that will be released in the Vaadin platform.

Quick start

The repository contains an interactive script for common tasks like running unit tests, integration tests and serving integration test pages.

To run it, execute ./scripts/run.js and select the appropriate menu options.

NOTE: The script requires a terminal and shell with TTY support, as well as a recent Node.js version.

Compiling all modules but excluding ITs

  • mvn clean compile -Drelease -T 2C

Compiling all the components and their modules including ITs

  • mvn clean test-compile -DskipFrontend -T 2C

Installing all modules

  • mvn clean install -DskipTests -Drelease -T 2C

Serving the IT pages of a component

  • mvn -am -pl vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests -DskipTests package jetty:run

Then navigate to http://localhost:8080/vaadin-checkbox/checkbox-test to see the IT page.

Running ITs of one component

  • mvn -am -pl vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests verify

Running ITs of all components

NOTE: this takes a long while and consumes a lot of resources in your computer, it's better to run tests in the merged repo as it is indicated in the following sections

  • mvn clean verify -T 2C

Merging ITs of all components in one module

There is a able to visit all IT modules and merge then into one unique module. It does substitutions in sources so as routes do no conflict, and also adjust ports etc.

  • ./scripts/mergeITs.js

NOTE: By default it merges all modules, but it's also possible to merge certain modules by passing arguments

  • ./scripts/mergeITs.js button text-field crud

To also include components that depend on the given ones, expand the list first with ./scripts/computeModules.js:

  • ./scripts/mergeITs.js $(./scripts/computeModules.js button)

Running ITs of all components in the merged module

It should take around 15-20 minutes depending on the computer capabilities.

  • mvn verify -Drun-it -pl integration-tests

NOTE: that we need to activate the module with the -Drun-it property. By default it runs 4 tests in parallel but you can change it by setting -Dfailsafe.forkCount=5.

Running in Sauce Labs

The time it takes depends on the number of browsers and the modules tested.

To select which browsers to test, set the TESTBENCH_GRID_BROWSERS environment variable with a list of browsers.

TESTBENCH_GRID_BROWSERS=edge,safari-13,firefox

Then run the following command, replacing the *** with your Sauce Labs credentials.

For testing one component run:

  • mvn verify -Dsauce.user=*** -Dsauce.sauceAccessKey=*** -pl vaadin-checkbox-flow-parent/vaadin-checkbox-flow-integration-tests

For running all merged components execute:

  • mvn verify -Dsauce.user=*** -Dsauce.sauceAccessKey=*** -Drun-it -pl integration-tests

Debugging web-test-runner tests of a component

Install the shared dev dependencies at the repo root:

  • npm install

Run the tests for the component:

  • node ./scripts/wtr.js grid --watch

This will build the frontend for the integration tests and start the Web Test Runner in watch mode.

NOTE: The tests actually import the client module under test from ..integration-tests/frontend/generated/jar-resources. For faster feedback loop you can work on the generated file directly. Just be careful not to lose your changes to it since it's not under version control.

Bumping version for all Maven modules

To update the version for all modules for a new major or minor, run the following command:

mvn versions:set -DnewVersion=<next-version> -DprocessAllModules=true -DgenerateBackupPoms=false

where you replace <next-version> with the version that you want to set.

Build script

The ./scripts/build.sh script is though to be run in CI, it compiles all modules, merge IT's and run those. It expects TBLICENSE and TBHUB variables when run in the CI server. Optionally it's possible to run just a bunch of modules e.g. ./scripts/build.sh grid combo-box

Using the component in a Flow application

To use the component in an application using maven, add the following dependency to your pom.xml:

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-checkbox-flow</artifactId>
    <version>${platform.version}</version>
</dependency>

Contributing

For submitting pull requests to this repo please check our contributing guidelines.

Update package version for @NpmPackage in all files

There are scripts available for updating the @NpmPackage annotation to its latest patch version:

  • ./scripts/updateNpmVer.js

Modify pom.xml files in modules

In order to align all component buids, maven pom files are generated from templates placed in scripts/templates.

If you need to make any modification in a component, consider whether it is convenient to add the same to all components, then modify files under the template and run:

  • ./scripts/updateJavaPOMs.sh script.

Formatting

Run mvn spotless:apply before pushing your code.

Bug and enhancement tickets

  • Bug tickets and enhancement requests for the web component implementations should go to the Vaadin web components monorepo https://github.com/vaadin/web-components/.
  • Issues that are not component-specific (e.g. requests for new components) or encompass multiple Flow components should be posted in this repository.

LICENSE

For specific module(s), check the LICENSE file under the parent module.