Hi ,
How to get the selected value of a combo box .
the code which i wrote always returns the previous value .
Code :
com.vaadin.ui.ComboBox cb = new com.vaadin.ui.ComboBox("Select");
cb.setNullSelectionAllowed(false);
for(int i = 1;i<=5;i++){
cb.addItem(item);
cb.setItemCaption(item,"val"+i);
}
cb.addListener(new Property.ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
System.out.println(event.getProperty().getValue());
}
});
What could be the problem ?
Please help.
–
Regards,
Niyas