Your data bean should never include Vaadin components; just store the selected value(s) in the original data format (bean class). Then use BeanItemContainers in your table that you populate yourself; Create The Table, fetch all possible selection values, create the BeanItemContainer from them, and set that container to the table. The form should then be able to set/get the values correctly.
I completely agree. I’d actually started out with a Collection<Object> and thats because if u look at the table, I’m using addContainerProperty
hurdles.addContainerProperty("Hurdle", String.class, null);
hurdles.setColumnWidth("Hurdle", 310);
hurdles.addContainerProperty("Choice", ComboBox.class, null);
hurdles.setColumnWidth("Choice", 100);
hurdles.addContainerProperty("Comment", TextField.class, null);
then add a row with
hurdles.addItem(new Object[]{
"Is there a market for the products of the business?", choice, new TextField()}, 1);
So my expectation was that my bean would be populated with Collection<Object>.
that didnt work though.
Yep I appreciate that, but my question is how…trust me I’ve tried so an example would be very helpful
Regards
Guys.
Pretty please I need this. I’ve already done a workaround but the code is not clean at all, so if you could help I would really appreciate it.
Regards