Opened 9 years ago
Closed 9 years ago
#13725 closed defect (duplicate)
dirtyObject is undefined dojox.rpc.JsonRest
Reported by: | stavarengo | Owned by: | Dustin Machi |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | RPC | Version: | 1.6.1 |
Keywords: | dojox, JsonRest, dirtyObjects, undefined | Cc: | |
Blocked By: | Blocking: |
Description
dirtyObject is undefined in "else" clause below:
dojo.connect(kwArgs,"onError",function(){ if(kwArgs.revertOnError!== false){ var postCommitDirtyObjects = dirtyObjects; dirtyObjects = savingObjects; var numDirty = 0; // make sure this does't do anything if it is called again jr.revert(); // revert if there was an error dirtyObjects = postCommitDirtyObjects; } else{ dirtyObjects = dirtyObject.concat(savingObjects); } });
I suppose that’s "dirtyObjects” (with "s") should be the correct instead of "dirtyObject".
‘Cause dojox.rpc.JsonRest? doesn't work properly when you set "revertOnError" to "false".
In this situation, if you set "revertOnError" to "false", try to post a new item and an error occurs, the JsonRest? will make a "PUT" request if you try post again (causing a server error in my case).
After I correct the variable name, the situation decrypted above doesn't occurs and JsonRest? can make a POST request even if a error occurred before.
Note: See
TracTickets for help on using
tickets.
Dup of #10615.