Functiondojox.data.JsonRestStore.newItem

dojo.require("dojox.rpc.JsonRestStore");
defined in dojox/rpc/JsonRestStore.js

adds a new item to the store at the specified point. Takes two parameters, data, and options.

Usage

function (/*Object*/ data, parentInfo) (view source)
parametertypedescription
dataObject*/ The data to be added in as an item.
parentInfo optional javascript object defining what item is the parent of this item (in a hierarchical store. Not all stores do hierarchical items), and what attribute of that parent to assign the new item to. If this is present, and the attribute specified is a multi-valued attribute, it will append this item into the array of values for that attribute. The structure of the object is as follows: { parent: someItem, } or { parentId: someItemId, }