You can store pending changes in a HashMap using the unique ID of the object as the key. When the use changes something in a row object, get it out of the map (creating it if necessary) and update the fields that changes. When the user presses Save, send all of the pending changes to the server.
Thanks, John LaBanca [email protected] On Thu, Dec 2, 2010 at 11:38 AM, Mittal <[email protected]> wrote: > I am using CellTable with simple pager to show ArrayList<Contact> > contacts. There are multiple columns that are editable mostly using > EditTextCell. I have implemented FieldUpdater for editable columns. > But I do not want to make server side save/update call each time there > is change made to particular editable column. > > I would like to collect all the updates, lets say in > ArrayList<Contact> modifiedContacts and send it server side by using > some kind of Save Contacts button. > > I am able to do this if I keep only one column editable, but moment I > add multiple columns as editable, I start getting duplicate objects in > my ArrayList<Contact> modifiedContacts since each editable column is > implementing FieldUpdater. > > When 2 or more columns of same row are updated, FieldUpdater of each > column is fired, storing duplicate objects in ArrayList<Contact> > modifiedContacts. > > I could use Set instead of ArrayList to store unique contact objects > but is there better way to do this ? > > Thanks > Mittal > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
