Initialize ComboBox

  1. Is it possible to initialize a given value to ComboBox which it is not in dropdown list? e.g. for the demo link http://demo.vaadin.com/sampler#ComboBoxNewItems, I want to set initial city to be London (not in the city list).

I tried comboBox.setValue(“London”) and comboBox.select(“London”), but failed.

  1. If I bind a BeanItemContainer to ComboBox, how can I choose a column to display its values in dropdown list?
  1. If ComboBox is not in multiselect mode setValue does eventually the same thing as select. Selecting and item with setValue() or select() is not possible, if the item is not in the container.
  2. Setting the caption property to your desired BeanItem property id uses that property value as a caption for the selection.