Hi,
I’m trying to use MultiselectComboBox in my Vaadin 8 project (First question is possibile?).
I’m also unable to add the Component into a vertical layout. If I cast the box component like that: root.addComponent((Component)box)
;
I recive this exception:
Caused by: java.lang.ClassCastException: class de.wathoserver.vaadin.MultiselectComboBox cannot be cast to class com.vaadin.ui.Component (de.wathoserver.vaadin.MultiselectComboBox and com.vaadin.ui.Component are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @18121865)
Any suggestion (is a problem with vaadin 8?)
This is the code:
root = new VerticalLayout();
final MultiselectComboBox<String> box = new MultiselectComboBox<String>();
box.setLabel("SimpleTest");
box.setPlaceholder("Click here to select items");
final List<String> items = new ArrayList<>();
items.add("One");
items.add("Two");
items.add("Three");
box.setItems(items);
root.addComponent(box);