Functiondojo.data.api.Write.setValues

dojo.require("dojo.data.api.Write");
defined in dojo/data/api/Write.js

Adds each value in the values array as a value of the given

Usage

function (item, /*String*/ attribute, /*Array*/ values) (view source)
parametertypedescription
item or if *attribute* is neither an attribute object or a string.
attributeStringThe attribute of the item to change represented as a string name.
valuesArrayAn array of values to assign to the attribute..

Examples

Example 1

var success = store.setValues(kermit, "color", ["green", "aqua"]);
success = store.setValues(kermit, "color", []);
if (success) {assert(!store.hasAttribute(kermit, "color"));}