dojox/data/AppStore (version 1.10)

Usage

var foo = new AppStore(args);
dojox/data/AppStore
<

The APP Store is instantiated either in markup or programmatically by supplying a url of the Collection to be used.

>The APP Store is instantiated either in markup or programmatically by supplying a url of the Collection to be used.

>
Parameter Type Description
args Object

An anonymous object to initialize properties. It expects the following values:

  • url: The url of the Collection to load.
  • urlPreventCache: Whether or not to append on cache prevention params (as defined by dojo.xhr*)

See the dojox/data/AppStore reference documentation for more information.

Property Summary

Method Summary

  • _addUpdate(update) Internal function to add an updated entry to our updates array
  • _assertIsAttribute(attribute) This function tests whether the item is an attribute.
  • _assertIsItem(item) This function tests whether the item is an item.
  • _containsValue(item,attribute,value,regexp,trim) Internal function for looking at the values contained by the item.
  • _fetchItems(request,fetchHandler,errorHandler) Fetch items (Atom entries) that match to a query
  • _finishFetchItems(request,fetchHandler,errorHandler) Internal function for finishing a fetch request.
  • _getAllItems() Function to return all entries in the Feed as an array of items.
  • _setFeed(feed,data) Sets the internal feed using a dojox.atom.io.model.Feed object.
  • close(request) See dojo/data/api/Read.close()
  • containsValue(item,attribute,value) See dojo/data/api/Read.containsValue()
  • deleteItem(item) See dojo/data/api/Write.deleteItem()
  • fetchItemByIdentity(keywordArgs) See dojo/data/api/Identity.fetchItemByIdentity()
  • getAttributes(item) See dojo/data/api/Read.getAttributes()
  • getFeatures() See dojo/data/api/Read.getFeatures()
  • getIdentity(item) See dojo/data/api/Identity.getIdentity()
  • getIdentityAttributes(item) See dojo/data/api/Identity.getIdentityAttributes()
  • getLabel(item) See dojo/data/api/Read.getLabel()
  • getLabelAttributes(item) See dojo/data/api/Read.getLabelAttributes()
  • getValue(item,attribute,defaultValue) See dojo/data/api/Read.getValue()
  • getValues(item,attribute) See dojo/data/api/Read.getValues()
  • hasAttribute(item,attribute) See dojo/data/api/Read.hasAttribute()
  • isDirty(item) See dojo/data/api/Write.isDirty()
  • isItem(something) See dojo/data/api/Read.isItem()
  • isItemLoaded(something) See dojo/data/api/Read.isItemLoaded()
  • loadItem(keywordArgs) See dojo/data/api/Read.loadItem()
  • newItem(keywordArgs) See dojo/data/api/Write.newItem()
  • revert() See dojo/data/api/Write.revert()
  • save(keywordArgs) See dojo/data/api/Write.save()
  • setValue(item,attribute,value) See dojo/data/api/Write.setValue()
  • setValues(item,attribute,values) See dojo/data/api/Write.setValues()
  • unsetAttribute(item,attribute) See dojo/data/api/Write.unsetAttribute()

Properties

_adds
Defined by: dojox/data/AppStore
_atomIO
Defined by: dojox/data/AppStore
_deletes
Defined by: dojox/data/AppStore
_feed
Defined by: dojox/data/AppStore
_processing
Defined by: dojox/data/AppStore
_requests
Defined by: dojox/data/AppStore
_updates
Defined by: dojox/data/AppStore
url
Defined by: dojox/data/AppStore

So the parser can instantiate the store via markup.

urlPreventCache
Defined by: dojox/data/AppStore

Whether or not to pass the preventCache parameter to the connection

xmethod
Defined by: dojox/data/AppStore

Whether to use X-Method-Override for PUT/DELETE.

Methods

_addUpdate(update)
Defined by dojox/data/AppStore

Internal function to add an updated entry to our updates array

Internal function to add an updated entry to our updates array

Parameter Type Description
update Object

The updated Entry we've changed.

_assertIsAttribute(attribute)
Defined by dojox/data/AppStore

This function tests whether the item is an attribute.

This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.

Parameter Type Description
attribute String

The attribute to test for being contained by the store.

Returns:any | boolean

Returns a boolean indicating whether this is a valid attribute.

_assertIsItem(item)
Defined by dojox/data/AppStore

This function tests whether the item is an item.

This function tests whether the item passed in is indeed an item in the store.

Parameter Type Description
item item

The item to test for being contained by the store.

_containsValue(item,attribute,value,regexp,trim)
Defined by dojox/data/AppStore

Internal function for looking at the values contained by the item.

Internal function for looking at the values contained by the item. This function allows for denoting if the comparison should be case sensitive for strings or not (for handling filtering cases where string case should not matter)

Parameter Type Description
item item

The data item to examine for attribute values.

attribute attribute-name-string

The attribute to inspect.

value anything

The value to match.

regexp RegExp
Optional

Optional regular expression generated off value if value was of string type to handle wildcarding. If present and attribute values are string, then it can be used for comparison instead of 'value'

trim Boolean
Optional
Returns:boolean
_fetchItems(request,fetchHandler,errorHandler)
Defined by dojox/data/AppStore

Fetch items (Atom entries) that match to a query

Fetch items (Atom entries) that match to a query

Parameter Type Description
request undefined

A request object

fetchHandler undefined

A function to call for fetched items

errorHandler undefined

A function to call on error

_finishFetchItems(request,fetchHandler,errorHandler)
Defined by dojox/data/AppStore

Internal function for finishing a fetch request.

Internal function for finishing a fetch request. Needed since the feed might not have been loaded, so we finish the fetch in a callback.

Parameter Type Description
request undefined

A request object

fetchHandler undefined

A function to call for fetched items

errorHandler undefined

A function to call on error

_getAllItems()
Defined by dojox/data/AppStore

Function to return all entries in the Feed as an array of items.

Function to return all entries in the Feed as an array of items.

Returns:any | Array

Array of all entries in the feed.

_setFeed(feed,data)
Defined by dojox/data/AppStore

Sets the internal feed using a dojox.atom.io.model.Feed object.

Sets the internal feed using a dojox.atom.io.model.Feed object. Also adds a property to the entries to track that they belong to this store. It also parses stored requests (since we were waiting on a callback) and executes those as well.

Parameter Type Description
feed undefined

The Feed to use for this data store.

data unused

Signature for this function is defined by AtomIO.getFeed, since this is a callback.

close(request)
Defined by dojox/data/AppStore

See dojo/data/api/Read.close()

Parameter Type Description
request dojo/data/api/Request | Object
Optional
containsValue(item,attribute,value)
Defined by dojox/data/AppStore

See dojo/data/api/Read.containsValue()

Parameter Type Description
item item
attribute attribute-name-string
value anything
Returns:undefined
deleteItem(item)
Defined by dojox/data/AppStore

See dojo/data/api/Write.deleteItem()

Parameter Type Description
item item
Returns:boolean
fetchItemByIdentity(keywordArgs)
Defined by dojox/data/AppStore

See dojo/data/api/Identity.fetchItemByIdentity()

Parameter Type Description
keywordArgs undefined
getAttributes(item)
Defined by dojox/data/AppStore

See dojo/data/api/Read.getAttributes()

Parameter Type Description
item item
Returns:Array
getFeatures()
Defined by dojox/data/AppStore

See dojo/data/api/Read.getFeatures()

Returns:object
getIdentity(item)
Defined by dojox/data/AppStore

See dojo/data/api/Identity.getIdentity()

Parameter Type Description
item item
Returns:undefined
getIdentityAttributes(item)
Defined by dojox/data/AppStore

See dojo/data/api/Identity.getIdentityAttributes()

Parameter Type Description
item item
Returns:Array
getLabel(item)
Defined by dojox/data/AppStore

See dojo/data/api/Read.getLabel()

Parameter Type Description
item item
Returns:undefined
getLabelAttributes(item)
Defined by dojox/data/AppStore

See dojo/data/api/Read.getLabelAttributes()

Parameter Type Description
item item
Returns:Array
getValue(item,attribute,defaultValue)
Defined by dojox/data/AppStore

See dojo/data/api/Read.getValue()

Parameter Type Description
item item
attribute attribute-name-string
defaultValue value
Optional
Returns:value
getValues(item,attribute)
Defined by dojox/data/AppStore

See dojo/data/api/Read.getValues()

Parameter Type Description
item item
attribute attribute-name-string
Returns:undefined | Array
hasAttribute(item,attribute)
Defined by dojox/data/AppStore

See dojo/data/api/Read.hasAttribute()

Parameter Type Description
item item
attribute attribute-name-string
Returns:boolean
isDirty(item)
Defined by dojox/data/AppStore

See dojo/data/api/Write.isDirty()

Parameter Type Description
item item
Optional
Returns:boolean
isItem(something)
Defined by dojox/data/AppStore

See dojo/data/api/Read.isItem()

Parameter Type Description
something anything
Returns:undefined
isItemLoaded(something)
Defined by dojox/data/AppStore

See dojo/data/api/Read.isItemLoaded()

Parameter Type Description
something anything
Returns:undefined
loadItem(keywordArgs)
Defined by dojox/data/AppStore

See dojo/data/api/Read.loadItem()

Parameter Type Description
keywordArgs Object
newItem(keywordArgs)
Defined by dojox/data/AppStore

See dojo/data/api/Write.newItem()

Parameter Type Description
keywordArgs Object
Optional
Returns:boolean
revert()
Defined by dojox/data/AppStore

See dojo/data/api/Write.revert()

Returns:boolean
save(keywordArgs)
Defined by dojox/data/AppStore

See dojo/data/api/Write.save()

Parameter Type Description
keywordArgs object
{
    onComplete: function
    onError: function
    scope: object
}
setValue(item,attribute,value)
Defined by dojox/data/AppStore

See dojo/data/api/Write.setValue()

Parameter Type Description
item item
attribute string
value almost anything
Returns:boolean
setValues(item,attribute,values)
Defined by dojox/data/AppStore

See dojo/data/api/Write.setValues()

Parameter Type Description
item item
attribute string
values array
Returns:undefined | boolean
unsetAttribute(item,attribute)
Defined by dojox/data/AppStore

See dojo/data/api/Write.unsetAttribute()

Parameter Type Description
item item
attribute string
Returns:boolean
Error in the documentation? Can’t find what you are looking for? Let us know!