Login Register Help
API Documentation
Choose a stylesheet:

Constructordojo.data.ItemFileReadStore

dojo.require("dojo.data.ItemFileReadStore");
The ItemFileReadStore implements the dojo.data.api.Read API and reads data from JSON files that have contents in this format -- { items: [ { name:'Kermit', color:'green', age:12, friends:['Gonzo', {_reference:{name:'Fozzie Bear'}}]}, { name:'Fozzie Bear', wears:['hat', 'tie']}, { name:'Miss Piggy', pets:'Foo-Foo'} ]} Note that it can also contain an 'identifer' property that specified which attribute on the items in the array of items that acts as the unique identifier for that item. use "" rather than undefined for the benefit of the parser (#3539)

Usage

var foo=new dojo.data.ItemFileReadStore(keywordParameters: Object);
parametertypedescription
keywordParametersObjecttypeMap: object) The structure of the typeMap object is as follows: { type0: function || object, type1: function || object, ... typeN: function || object } Where if it is a function, it is assumed to be an object constructor that takes the value of _value as the initialization parameters. If it is an object, then it is assumed to be an object of general form: { type: function, //constructor. deserialize: function(value) //The function that parses the value and constructs the object defined by type appropriately. }

Jump to PropertiesJump to FunctionsNamespacesBack to top

Jump to PropertiesJump to NamespacesFunctionsBack to top

See dojo.data.api.Read.close()
Functionconstructor(keywordParameters: Object)
constructor
FunctioncontainsValue(item: item, attribute: attribute-name-string, value: anything): boolean.
See dojo.data.api.Read.containsValue()
See dojo.data.api.Identity.fetchItemByIdentity()
FunctiongetAttributes(item: item): Array
See dojo.data.api.Read.getAttributes()
See dojo.data.api.Read.getFeatures()
FunctiongetIdentity(item: item): Number | Object | | String | null
See dojo.data.api.Identity.getIdentity()
FunctiongetIdentityAttributes(item: item): null | Array
See dojo.data.api.Identity.getIdentifierAttributes()
FunctiongetLabel(item: item): String | undefined
See dojo.data.api.Read.getLabel()
FunctiongetLabelAttributes(item: item): Array | null
See dojo.data.api.Read.getLabelAttributes()
FunctiongetValue(item: item, attribute: attribute-name-string, defaultValue: value?): mixed
See dojo.data.api.Read.getValue()
FunctiongetValues(item: item, attribute: attribute-name-string): Array
See dojo.data.api.Read.getValues()
FunctionhasAttribute(item: item, attribute: attribute-name-string)
See dojo.data.api.Read.hasAttribute()
FunctionisItem(something: anything): Boolean
See dojo.data.api.Read.isItem()
FunctionisItemLoaded(something: anything): Boolean
See dojo.data.api.Read.isItemLoaded()
FunctionloadItem(keywordArgs: Object)
See dojo.data.api.Read.loadItem()
Function_addReferenceToMap(refItem: item, parentItem: item, attribute: String)
Method to add an reference map entry for an item and attribute.
Function_assertIsAttribute(attribute: attribute-name-string)
This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
Function_assertIsItem(item: item)
This function tests whether the item passed in is indeed an item in the store.
Function_containsValue(item: item, attribute: attribute-name-string, value: anything, regexp: RegExp?): Boolean
Internal function for looking at the values contained by the item.
Function_fetchItems(keywordArgs: Object, findCallback: Function, errorCallback: Function)
See dojo.data.util.simpleFetch.fetch()
Internal function to force a load of the store if it hasn't occurred yet. This is required for specific functions to work properly.
Internal function to look an item up by its identity map.
Function_getItemsArray(queryOptions: Object?)
Internal function to determine which list of items to search over.
Function to parse the loaded data into item format and build the internal items array.
Internal function to execute delayed request in the store. Execute any deferred fetches now.

Jump to FunctionsJump to NamespacesPropertiesBack to top