开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜