I would like to create an object client side and add it to another object.
I'm using velocity and Spring.
I form a command object and pass it to the view as a backing object.
I want to create and add a new object to this command object without saving either object to the db.
The reason for this is that I want to have some persistence if there are errors during save. I want the command to be given back to the user in the same state it was submitted.
Thanks for the answers. Being more specific, I need to bind a number of fields to an object of an object.
For example if I wanted to create a new contact and add them to a customer acc. So the contact is made up of a number of strings. so I need to bind the strings to the contact and then bind the contact to a collection of contacts on the customer acc.
I'd like to do it in an expanding div so the user doesn't have to leave the page.