Multiselect Select Component

Hay there,

I wanted to change a ComboBox to a MultiselectDropDown.

I read here
https://vaadin.com/book/-/page/components.selecting.html

and had chose “Select” Component as writte here:

Select
In single selection mode, a drop-down list with a text input area, which the user can use to filter the displayed items. In multiselect mode, a list box equivalent to ListSelect.

So I though it supports multiselect but now I’m getting this Error:

Caused by: java.lang.UnsupportedOperationException: Multiselect not supported
at com.vaadin.ui.ComboBox.setMultiSelect(ComboBox.java:782)

Can s.o. help me?

How are you trying to call it?

You should also use a ListSelect, OptionGroup or a TwinColselect instead of setMultiSelect as of Vaadin 7.0

I call it this way:

private Select dd_federung = new Select();

dd_federung.setMultiSelect(true);

The Problem is that there is not much space for a listbox on my form. So I wanted a ComboBox with multiselect is this not possible?

What Vaadin Version are you using?
Looking at the api it seems that the Select Component doesn’t even have such a method as opposed to the Combobox Component which has one but is deprecated.

I never tried it myself as i don’t really see how a combobox with multiselect is supposed to work. having something like a listselect makes at least to me right now more sense. It should still be possible to use combobox.setMultiselect(true) in Vaadin 7 but the method is deprecated so it might be getting removed sometime in the future.