I am new to vaadin and have a databinding problem. I have posted allready in the vaadin forum, but no answer up to now.
if you answer here, I will of course reward it anyway.
https://vaadin.com/forum/-/message_boards/view_message/1057226
thanks in advance.
greets,
Andreas
Additional information: I tried allready to iterate over the items in the container, after pressing a save button. After deleting all original elements in the model collection, and adding copies from the container, the GUI breaks. Some other GUI elements do not respond anymore.
I have personally never used ListSelect, but I found this from the API docs:
I’d recommend
BeanItemContainer. You can use it like this:The downside (or benefit, it depends 🙂 of this is that you can’t add duplicate entries to a BeanItemContainer. In the example above the exclamation mark gets only added once.
You can get a Collection of Strings by calling:
If you need to support duplicate entries, take a look at IndexedContainer. With IndexedContainer you can add a String property by calling
myIndexedContainer.addContainerProperty("caption", String.class, "");and give each Item a unique itemId (or let the container generate the id’s automatically).