ComboBox setValue don´t works

Hello,

i have a problem with a combobox.
This is my implementation from the combobox:

this.comboBox = new ComboBox();
		for (int i = 0; i < dates.length; i++) {
			comboBox.addItem(dates[i]
);
		}

		comboBox.setNewItemsAllowed(true);
		comboBox.setNewItemHandler(new NewItemHandler()
		{
			public void addNewItem(String newItemCaption)
			{
				// TODO: Do the same like the value change listener
				getWindow().showNotification("Selected: " + newItemCaption);
			}
		});

		comboBox.setImmediate(true);
		comboBox.addListener(new ValueChangeListener()
		{
			public void valueChange(ValueChangeEvent event)
			{
				// TODO: Do something with the string
				getWindow().showNotification("Selected: " + event.getProperty());
			}
		});
		this.root.addComponent(comboBox);

And in a other window i will set the value for the combox box:


	/**
	 * process the save button
	 */
	protected void processSaveBtn()
	{
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		Date date = (Date) this.calendarPointOfTime.getValue();
		String value = format.format(date);


		System.out.println("CurrentValue: " + this.parent.getComboBox().getValue()
				+ " Value: " + value);
		this.parent.getComboBox().setValue(value);
		this.parent.getPopupButton().setPopupVisible(false);
	}

On my prints it works … but it wont set the value to the combobox.

Dominik

I found a nonsatisfying workaround.
Thanks for the readers…

Hi Dominik,

use comboBox.select(Object objectId).

Regards,
Pascal

Dominik, Could you please provide me the work around ?