Class idx.data.JsonStore


Extends dojo.data.ItemFileWriteStore.
Data store to deal with simple JavaScript object/array. This class also allows updating and retrieving array of JavaScript objects representing data items, using setData()/getData() methods. getItemData() method can be used to extract a plain JavaScript object from a specified data item.
Defined in: <idx\data\JsonStore.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
Identifier for items.
 
items 
Property name to contain item array when an object is passed as data.
 
label 
Label attribute for items.

Method Summary

Method Attributes Method Name and Description
 
Constructs with parameters.
 
Enforces loading or building items from "url" or "data" properties.
 
Retrieves the current data.
 
Retrieves the current data of the specified item.
 
setData(data)
Sets new data.
 
setUrl(url)
Specifies a URL to load data.

Constructor Detail

idx.data.JsonStore()

Field Detail

{String} identifier

Identifier for items.
Default Value:
""

{String} items

Property name to contain item array when an object is passed as data.
Default Value:
""

{String} label

Label attribute for items.
Default Value:
""

Method Detail

constructor(args)

Constructs with parameters.
Parameters:
{Object} args
Optionally specifies "identifier", "label" and "items".

forceLoad()

Enforces loading or building items from "url" or "data" properties.

{Object|Array} getData()

Retrieves the current data.
Returns:
{Object|Array}

{Object} getItemData(item)

Retrieves the current data of the specified item.
Parameters:
{Object} item
Returns:
{Object}

setData(data)

Sets new data.
Parameters:
{Object|Array} data

setUrl(url)

Specifies a URL to load data.
Parameters:
{String} url