Best option to update only selected rows form Struts2
posted 4 years ago
I've been stucked for for a while with this issue. I have a form which consists in a set of rows from an iterator property. Each row represent an object which consists mainly of about 30 checkboxes and 3 or 4 textfields input and it has the corresponding checkbox representing if row is select. I've been struggling in how to make only selected rows being updated once form is submitted. Value of each selected row checkbox corresponds with the index of the object to be updated in the iterator. So how can I achieve updating only the values of selected objects in the iterator?
I've thought about using a hidden value an array of selected items or something like that populated by a jquery script but I had no luck, another option I think is build a subset of the iterator list which contains only the elements to be updated. Anyone can bring a ray of light about how can achieve that functionality?