Opened 11 years ago

Closed 11 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:


dirtyObject is undefined in "else" clause below:

    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.

Change History (1)

comment:1 Changed 11 years ago by bill

Resolution: duplicate
Status: newclosed

Dup of #10615.

Note: See TracTickets for help on using tickets.