blob: 1a66a0ff4e3eb3330d52f396f043236c7842a919 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.vaadin.tests.components.combobox;
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.CheckBox;
public class ComboBoxNoTextInput extends ComboBoxSelecting {
@Override
protected void setup(VaadinRequest request) {
super.setup(request);
comboBox.setTextInputAllowed(true);
final CheckBox textInputCheckBox = new CheckBox("Text Input", true);
textInputCheckBox.setId("textInput");
textInputCheckBox.addValueChangeListener(event -> comboBox
.setTextInputAllowed(textInputCheckBox.getValue()));
addComponent(textInputCheckBox);
}
@Override
protected String getTestDescription() {
return "ComboBox should open popup on click when text input is not allowed.";
}
}
|