My understanding of Form submit behavior with models is that onSubmit,
Wicket loads the model, and then applies all the changed form values to
that model.  This works fine for non-collection types (Strings, ints etc)
set from all the input types Ive been using (TextField, RadioChoice, DDC
etc.).

However, what is not working is the addition of new Entities that live
inside a Collection of the IModel entity.  Lets say I have a 1..N
relationship, A..B, and I want to add 2 new Bs to A's collection (a fairly
common requirement) in my form. I dont want these new B entities persisted
in the DB until the entire form is submitted (Im using JPA cascade).   How
do I code this part of the form/logic so that when I hit submit, I get
those 2 new B entities added to the A.b collection, so that I can save(a)
and have everything update?

Regards

Nick

Reply via email to