Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#11091 closed enhancement (fixed)

Cancel Changing method needed in JsonRestStore

Reported by: Jean-Rubin Leonard Owned by: Kris Zyp
Priority: high Milestone: 1.7
Component: Data Version: 1.5.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Hi to give more control to the developer, a function that allows to cancel an item's dirty stance is necessary. Currently no such method exist. One use case where such a method is necessary is in the case of a tree that support DnD with JsonReststore? as the store. In the tree's DnD, when we move an item from ParentNodeA to parentNodeB, the moved item is deleted from parentNodeA (1st operation) then moved to ParentNodeB (2nd operation). Both those operations cause a commit at the store level and two trips to the server.

Such an approach is potentially subject to race conditions between the 1st and 2nd operation. To avoid such a race condition, one approach is to simply record the 1st operation in the store widget and only trigger the save on the second operation. To do so however we must be able to cancel the dirty state of the node that was affected in the 1st operation to avoid two commits to the server. Thats where the attached patch comes handy.

Attachments (1)

JsonRestStore.diff (1.1 KB) - added by Jean-Rubin Leonard 9 years ago.
Patch file to add CancelChanging? method

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Jean-Rubin Leonard

Attachment: JsonRestStore.diff added

Patch file to add CancelChanging? method

comment:1 Changed 9 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to kriszyp

comment:2 Changed 9 years ago by bill

Owner: changed from kriszyp to Kris Zyp

comment:3 Changed 8 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

(In [24036]) Add cancelChanging, fixes #11091

comment:4 Changed 8 years ago by bill

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