开发者

How can I save a single item in a JsonRestStore when multiple items are dirty?

开发者 https://www.devze.com 2023-02-23 04:42 出处:网络
dojox.rpc开发者_JAVA技巧.JsonRest.schemas contains the global reference to all the JsonRestStores which makes creating multiple stores with the same target impossible.

dojox.rpc开发者_JAVA技巧.JsonRest.schemas contains the global reference to all the JsonRestStores which makes creating multiple stores with the same target impossible.

How can I save a single item in a JsonRestStore when multiple items are dirty?

I would like to be able to save a single item and only that item from a JsonRestStore even when other items are dirty. For example:

var dataStore = new dojox.data.JsonRestStore({
    target : "/project-services/"
});

dataStore.fetchItemByIdentity({identity: 123});
dataStore.setValue(item123, 'prop', "Change 123");

dataStore.fetchItemByIdentity({identity: 456});
dataStore.setValue(item456, 'prop', "Change 456");

dataStore.save({item:item123}); // This would PUT item123 only
0

精彩评论

暂无评论...
验证码 换一张
取 消