dojox/mobile/_StoreMixin (version 1.10)

Summary

Mixin for widgets to enable dojo/store data store.

By mixing this class into a widget, it can get data through a dojo/store data store. The widget must implement the following methods to handle the retrieved data:

See the dojox/mobile/_StoreMixin reference documentation for more information.

Property Summary

  • childrenPropertyA property name (a property in the dojo/store item) that specifies that item's children.
  • labelPropertyA property name (a property in the dojo/store item) that specifies that item's label.
  • queryA query that can be passed to 'store' to initially filter the items.
  • queryOptionsAn optional parameter for the query.
  • storeReference to data provider object used by this widget.

Method Summary

  • _setQuery(query,queryOptions)
  • destroy()
  • refresh() Fetches the data and generates the list items.
  • setQuery(query,queryOptions)
  • setStore(store,query,queryOptions) Sets the store to use with this widget.

Event Summary

  • onAdd(item,insertedInto) Called when a new data item has been added to the store.
  • onComplete(items) A handler that is called after the fetch completes.
  • onDelete(item,removedFrom) Called when a data item has been removed from the store.
  • onError(errorData) An error handler.
  • onUpdate(item,insertedInto) Called when an existing data item has been modified in the store.

Properties

childrenProperty

A property name (a property in the dojo/store item) that specifies that item's children.

labelProperty

A property name (a property in the dojo/store item) that specifies that item's label.

query

A query that can be passed to 'store' to initially filter the items.

queryOptions

An optional parameter for the query.

store

Reference to data provider object used by this widget.

Methods

_setQuery(query,queryOptions)
Parameter Type Description
query String
queryOptions Object
destroy()
refresh()

Fetches the data and generates the list items.

Returns:null | undefined
setQuery(query,queryOptions)
Parameter Type Description
query String
queryOptions Object
Returns:undefined
setStore(store,query,queryOptions)

Sets the store to use with this widget.

Parameter Type Description
store dojo/store/api/Store
query String
queryOptions Object
Returns:null | undefined

Events

onAdd(item,insertedInto)

Called when a new data item has been added to the store. Note: for compatibility with previous versions where this function did not exist, if onAdd is not defined, onUpdate will be called instead.

Parameter Type Description
item undefined
insertedInto undefined
onComplete(items)

A handler that is called after the fetch completes.

Parameter Type Description
items undefined
onDelete(item,removedFrom)

Called when a data item has been removed from the store.

Parameter Type Description
item undefined
removedFrom undefined
onError(errorData)

An error handler.

Parameter Type Description
errorData undefined
onUpdate(item,insertedInto)

Called when an existing data item has been modified in the store. Note: for compatibility with previous versions where only onUpdate was present, if onAdd is not defined, onUpdate will be called instead.

Parameter Type Description
item undefined
insertedInto undefined
Error in the documentation? Can’t find what you are looking for? Let us know!