Functiondojo.data.api.Read.getValue

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

Saying that an "item x does not have a value for an attribute y" is identical to saying that an "item x does not have attribute y". It is an oxymoron to say "that attribute is present but has no values" or "the item has that attribute but does not have any attribute values". If store.hasAttribute(item, attribute) returns false, then store.getValue(item, attribute) will return undefined.

Usage

function (item, attribute, ?defaultValue) (view source)
parametertypedescription
item The item to access values on.
attribute The attribute to access represented as a string.
defaultValue Optional. Optional. A default value to use for the getValue return in the attribute does not exist or has no value.

Examples

Example 1

var darthVader = store.getValue(lukeSkywalker, "father");