Beanfieldgorup commit/rollback

Hi, i have a question regarding data binding with BeanFieldGroup.

When i call the commit and the bean occurs a Exception, not all binding values are rollbacked.
Just the invalid fields.

After the user commits again, all fields are again commited. If the value of a field is add to a List, it is now contain twice.
How can i rollback all fields after a commit fails?

Are you sure you actually need the buffering at BeanFieldGroup (~field) level ? I haven’t really found that many good use cases for it in real life applications and it is in many ways quite problematic.

Your entity object is pretty much always “detached” and you can safely made modification to it directly and it works as your “buffer”. And if you are really working with live objects, it is rather easy to create a clone of your entity object or a custom DTO, whose values you finally copy back to the live object once you have done all necessary validation.

In Viritin add-on only “unbuffered mode” is supported in AbstractForm and MBeanFieldField group. This greatly simplifies many things and without accepting this limitation there would be a handful of feature that just wouldn’t be possible to accomplish.