Re: General Question: EditingContext.saveChanges() and the back button
David LeBer <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
On 1-Mar-06, at 10:59 AM, Philipp Leusmann wrote: > Hi List, > > I have a general question regarding webobjects-programming and back- > button > issues: > I have two instances of subclasses of EOCustomObjects in a list. In a > component I edit the first one, but do not call > editingContext.saveChanges();. Now I hit the backbutton, edit the > second > instance and call editingContext.saveChanges(); afterwards. As > expected the > changes in both objects are saved. But I consider this quite > unwanted, since > normal web-users should not worry about the webapps' editingContext. > Is there an easy technique to avoid this behaviour? Or will I > always have to > work with copies of objects? So you've got this: List -> selectObject -> EditPage -> back button -> List -> selectObject -> EditPage -> saveChanges It is generally considered best practices to give each of your edit pages their own editing context. That way calling saveChanges on the EC for the second edit page will not effect the first. -- ;david -- David LeBer Codeferous Software 'co-defer-ous' adj. producing or containing code site: http://www.codeferous.com blog: http://david.codeferous.com _______________________________________________ WebObjects-dev mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/webobjects-dev
smime.p7s
(application/pkcs7-signature, 2.3 KB) - not displayed