How to bind a Map to Fields in a FieldGroup?

I have a bean that contains a Map. I use this to create a BeanItem and then a FieldGroup from that. How can I bind the entries of the Map to individual Fields so that on a commit in the FieldGroup the values from the fields are written back to the entries in the map?

Hi,

I think I had excactly what you need in my Vaadin 6 era
SmartFields
add-on (that was never publishded to the Directory). I just last/this week recycled some of its collection related field ideas to add-on called Viritin, but I haven’t worked with the MapField yet.

I created an issue about this to the Viritin github project. Want to try to upgrade the field from SmartFields to Viritin?

cheers,
matti

Thank you for your help. Unfortunately it seems my use case is a bit different. I don’t want to show all the values in a Table but rather selected ones in TextFields. My solution now is a custom implementation of Property that is backed by the Map. On the BeanItem I add this custom Property for all the necessary values and afterwards bind those to the TextFields.

Ah, ok, so you are using kind of a “nested string property”, but instead of being inside another object it is an entry in map? If you came up with a reusable solution, please share it in the Directory.

cheers,
matti