I would use 2 wrap classes, representing the custom objects as well as their modified state with a boolean bModified
.
public class wrap1 {
public Custom_Object_1__c obj { get; set; }
public Boolean bModified { get; set; }
public wrap1(Custom_Object_1__c obj) {
this.obj = obj;
this.modified = false;
}
}
So you can populate two different lists of wrap1 and wrap2 with SOQL Query :
list<wrap1> l1 = new list<wrap1>();
for(Custom_Object_1__c obj : /*your query*/) {
l1.add(new wrap1(obj));
}
When the user changes something on a table, you change bModified to true (calling an action with the index of the wrap as parameter)
When the user clicks "Save", you check which wrap1 have bModified to true, and populate another list that you will update.
You have to do that because if your query displays 100 records, and the users modifies only 2 of them, the scope of the update will be only those two records, not all the 100 ones.
Be sure to escape the value of the account name entered in the search module, for security reasons.
Also, beware of the view state in your page... The more you have wrap1 and wrap2 instances, the bigger the view state will be.