I am populating the ComboBox with a datasource table (value int, visible_value String).
But when I do form.setIemDataSource() the value does not show up.
Then, when I do not use the visible_value then it populates on selecting a row.
So with visible_value the combobox is not populating.
cb = new ComboBox(“tit”);
cb.setItemCaption(value); // this works ok
And I try this:
cb = new ComboBox(“tit”);
cb.setItemCaption(value, (String) visible_value); // this does not work
Question: Is there a programatic way to select a item from combobox when using the visible_value ?
The table I have is myvideo ( value int, visible_value String):
value visible_value
1 GO_TO_MOVIE
2 GET_DVD
3 RENT_VIDEO
Create a simple form, a table and ComboBox to recreate this. Have a split panel with top panel showing form and bottom panel showing the table list. When you select a row in list panel the top form panel shows the combobox.
Please find attached the zip file having a simple application with just one form showing the problem in “cities” drop down. I used the Person and PersonContainer from the vaadin tutorial.
11216.zip (3.33 KB)