Archie
Archie

Reputation: 5421

What is the replacement for ListSelect in Vaadin 22?

I'm trying to update an application from Vaadin 7/8 to Vaadin 22.

ListSelect is gone, so I need a new widget field that satisfies these requirements:

  1. Allows choosing multiple items
  2. Suitable for use in FormLayout with value bound using Binder
  3. Scrolls automatically when there are more than a handful of choices

None of the widgets in Vaadin 22 seem to qualify:

What am I missing here?? What is the new equivalent of the old ListSelect?

Upvotes: 3

Views: 212

Answers (1)

ollitietavainen
ollitietavainen

Reputation: 4275

If your Grid is set to multiselect mode, you can use grid.asMultiSelect() to return a MultiSelect object that does implement HasValue and can be used with Binder. Similarly, in single-select mode, grid.asSingleSelect() returns a bindable SingleSelect object.

Upvotes: 2

Related Questions