ComboBox does not set selected item with setValue()

Hi all…

I Have a ComboBox filled with a BeanItemContainer

Sometimes, I got a instance of X and, I want to set it as the selected item of the ComboBox, with setValue().

If I do a getValue() latter, I can get the item that I have set manually, but the ItemCaption is not showed on the combo.

My equals method is implemented, and is working correctly.

This is the normal behavior?

Many thanks!

Hi all… Nobody haves this problem?

Ive made tests with my Equals methods, and it is working right, at least I think that…

Can anyone post the Equals methods of any of your Beans? I will appreciate so mutch!

Many Thanks by any help!

Eduardo Frazão

Ensure equals() and hashCode() are both correct, the latter especially if you allow multi-select. Also, if you allow multi-select, the get/set operations on the combobox require a java.util.Set of your item. Hope this helps…