Form with TextField to add new object to entity member collection

I have a form to edit an object from a container. The object contains a OneToMany relation to List. In the form footer, I load the pre-existing comment objects and then provide a field that is intended to act as a single Comment object. the idea is that if the comment field is not empty, then add it to the collection and save it when the form is committed. I’m finding it difficult to provide a decent implementation of such functionality. Does anyone have any tips/pointers/suggestions/examples as to how I can implement this?

If you haven’t already, a quick tip: Take a look at the CustomField:

http://vaadin.com/directory#addon/33

It is meant to provide custom field types that can save data/load/present data differently. Then you should use the FieldFactory to provide the Form with a custom implementation in the case you need one.