setMultiSelect

Hi everybody

I like to use the multi selection mode of the select component.

if i set: setMultiSelect(false) i get the dropdown list as excpected.

As soon as i set it to false the component does not work any more. There is no multi selection - the component looks the same as before but the dropdown is not working any more.

What am i doing wrong ?



import com.vaadin.Application;
import com.vaadin.ui.*;

public class TestvaadinApplication extends Application {
	@Override
	public void init() {
		Window mainWindow = new Window("Testvaadin Application");
		Label label = new Label("Hello Vaadin user");
		
		Select selectComponent = new Select();
		selectComponent.setMultiSelect(true);

		String[] selection = {"One", "Hund", "Three"};
		for(String word: selection){
			selectComponent.addItem(word);
		}
		
		mainWindow.addComponent(selectComponent);
		mainWindow.addComponent(label);
		setMainWindow(mainWindow);
	}

}


Ok, solved problem.

Took an other component: ListSelect.

Now it works the way it should :grin:

By the way this sample collection is great, havent seen it before…next time i open my eyes … :*)


Component samples