combobox option value

in html,
select box code …

A B C

in vaadin, I use comboBox like this,

 ComboBox combo = new ComboBox('comboBox');
   combo.addItem("A");
   combo.addItem("B");
   combo.addItem("C");
   combo.addValueChangeListener(new ValueChangeListener() {

    @Override
    public void valueChange(ValueChangeEvent event) {

        com.vaadin.data.Property changedProeprty = event.getProperty();
        String value = changedProeprty.toString() ;
    }
});

How can I use option value in comboBox. ?

If you want value “1” with caption “A” you can set it for example like this:

combo.addItem("1"); combo.setItemCaption("1", "A"); Then you can get the value with

event.getProperty().getValue() You can also ask the component for it directly

combo.getValue()