#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: |
Description
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) { jr.changing(obj.object); });
Change History (5)
comment:1 Changed 11 years ago by
Owner: | changed from Adam Peller to Kris Zyp |
---|
comment:2 Changed 9 years ago by
comment:3 Changed 9 years ago by
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:5 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
Partly addressed in #13037, but there's still a reference to dirtyObject.