ComboBox ValueChangeListener gets fired too late

Hi All,

got a problem with a ComboBox.

Behaviour: When I change the value via the DropDown Icon the Property.ValueChangeListener does not get fired directly. It gets fired when I click on the dropdown icon next time.

Code-Examples:

public class MyTabSheet extends ApplicationTab implements Property.ValueChangeListener
this.cSelector = new ComboBox();
public void valueChange(ValueChangeEvent event) 
	{
		getWindow().showNotification(event.getProperty().toString());		
	}

How can I solve that any change by drop down icon fires an event directly on changes?

regards
Dirk

Hi,

you should call

cSelector.setImmediate(true);

All fields should be set immediate if you want the value to be communicated to the server immediately. Otherwise the value is sent the next time there is a server request for any reason (in your case the reason is for fetching the combobox contents).

thx a lot, this was helpful…