Hi all,
On a view I have 1 form and 1 list with form - both are within single tag. List is bound to ArrayList of beans and related form is used to add objects to that list. There are 2 actions on page: adding to list and saving all data.
Now the problem is that if user clicks save then whole form is submitted, bound and validated. The list adding form fails validation because it is probably empty at that point. If I do not validate that form then Spring would still bind that element to list[list.size()] and because all fields are empty for that bean hibernate fails to save it.
I need any ideas or practices how this kind of things are solved. How save would bind and validate part of the form and addNewItem would bind and validate another part.