Opened 13 years ago

Closed 6 years ago

#9639 closed enhancement (wontfix)

Data Write API to pass more information to custom .save ({onComplete: myCustom } ) functions

Reported by: vlad Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.11
Component: Data Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


.save function in the ItemFileWrite? store and its descendants allow to specify a custom function to be called

when the 'save' has completed.

For example{onComplete: mySaveWasDONE} );

this works even in rest stores that would call mySaveWasDONE after an xhr call returns

Currently, however, no useful information is passed down to mySaveWasDONE (in fact no arguments are passed).

the internal APis had to figure out, what items were to be 'updated', 'deleted' and added

so, it would be nice that the Ids (identities) of those items would have been passed down as arguments to that function

so that a developer could perform tasks (typically in my case clean ups of various tracking arrays that track for example original values of the updated items)

Right now, I can do the clean ups but I invoke the clean up routines in 'handle' method of the xhr calls generated by REST stores.

That however, 'spreads out' the logic that really should reside in the store and be executed when data was saved successfully.

Change History (4)

comment:1 Changed 12 years ago by Jared Jurkiewicz

Passing IDs are not possible for all stores. Identity is not required implementation for a store to implement write.

comment:2 Changed 12 years ago by vlad

ok,then for the stores that are REST stores (because those are the ones where data updates are split into multiple sessions (which adds quite a bit of complexity to the server handling ))

comment:3 Changed 12 years ago by Jared Jurkiewicz

Milestone: tbdfuture

comment:4 Changed 6 years ago by dylan

Milestone: future1.11
Resolution: wontfix
Status: newclosed

Given that we've moved on first to dojo/store and now dstore, I'm going to close this as wontfix.

Note: See TracTickets for help on using tickets.