Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#10615 closed defect (fixed)

JsonRest.js: Put objects in dirty state if a save fails

Reported by: holger Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: Dojox Version: 1.4.0
Keywords: JsonRest dirty Cc: [email protected]
Blocked By: Blocking:


Changeset 20693 for dojox/trunk/rpc/JsonRest.js: [line 121]

dirtyObjects = dirtyObject.concat(savingObjects);

That doesn't works well for me. dirtyObject is not referenced somewhere else. I tried to change it to dirtyObjects.concat but in this case dirtyObjects tends to grow if more then one object has been rejected by the server and moreover the dirty-flag hasn't been set, again. So, I found a solution with:

   dojo.forEach(savingObjects, function(obj) {

Change History (5)

comment:1 Changed 12 years ago by Adam Peller

Owner: changed from Adam Peller to Kris Zyp

comment:2 Changed 10 years ago by bill

Partly addressed in #13037, but there's still a reference to dirtyObject.

comment:3 Changed 10 years ago by reubenh

This is still an issue in 1.7.1.

As an example, when performing a JsonRestStore?.save({revertOnError: false}), a ReferenceError? is triggered, due to the reference to dirtyObject, which is not defined.

Changing the reference to diryObjects does not work either, but the solution mentioned in the original post does.

Presence of this bug makes CDN usage a no go for people wishing to use the revertOneError: false option, since JsonRest?.js needs to be manually patched.

comment:4 Changed 10 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [27483]:

Properly add dirty objects back on failure-induced revert, fixes #10615 !strict

comment:5 Changed 10 years ago by bill

Milestone: tbd1.8
Note: See TracTickets for help on using tickets.