get TextInput value back in ComboBox


I have a ComboBox with setTextInputAllowed to true, but How do I get the textinput value back? I tried call getValue(), but the return is null? then how do I get the user input back?

Thanks in advance.

setTextInputAllowed is true by default. Try setNewItemsAllowed(true) too, that will allow adding items to your select on both blur and when enter is pressed. Does this help you?

No luck. get get null from getValue(). but thanks for answer anyway.

How have you created your ComboBox? At what point are you checking for the value?


This worked for me. Add a few items to the ComboBox, and click the “Click” button. A notification should popup displaying the chosen value.

CssLayout layout = new CssLayout();

final ComboBox combobox = new ComboBox();

Button button = new Button("Click", new Button.ClickListener() {

  public void buttonClick(ClickEvent event) {;

layout.addComponents(combobox, button);

All right. It works now. The problem is the IDE somehow didn’t auto deploy the changed code after rebuild.

Thanks for your guy.