Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin 8 - TwinColSelect not display the result of setValue()
Hi fellow devs,
I used setValue() to update the values from database, and I checked the getSelectedItems() which return my expected results. However, they did not appear on right column.
// init the left column with an ArrayList<Province> contains all provinces in my country
provinceTwinCol.setItems(provinceDataService.getAll());
...
// in my Grid event handler, which display the entity in a form
// provinceList is well retrieved from entity and display finely in ComboBox
provinceComboBox.setItems(provinceList);
System.out.println("ArrayList: " + provinceList);
// both the set and the selected items are not null, and are exactly the provinceList
// I also debugged and check the selection private member of TwinColSelect object
HashSet<Province> values = new HashSet<Province>(provinceList);
System.out.println("Set: " + values);
provinceTwinCol.setValue(values);
System.out.println("Selected: " + provinceTwinCol.getSelectedItems());
Since Vaadin 8 automatically setImmediate(true), I really don't know why my selected items are not displayed (select() method return the same result).
I'm using vaadin-spring 2.0.1 (vaadin-server 8.0-SNAPSHOT) and also trying vaadin-server 8.0.4 but there is no difference.
Please help!
Oh, my bad.
I forgot overriding the equals() method of Province class, such an amateurish mistake...
Sorry ^^