dojox/mobile/_StoreListMixin (version 1.10)

dojox/mobile/_StoreMixin

Summary

Mixin for widgets to generate the list items corresponding to the dojo/store data provider object.

Mixin for widgets to generate the list items corresponding to the dojo/store data provider object. By mixing this class into the widgets, the list item nodes are generated as the child nodes of the widget and automatically regenerated whenever the corresponding data items are modified.

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

Property Summary

  • appendIf true, refresh() does not clear the existing items.
  • childrenPropertyA property name (a property in the dojo/store item) that specifies that item's children.
  • itemMapAn optional parameter mapping field names from the store to ItemList names.
  • 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

Event Summary

  • onAdd(item,insertedInto) Calls createListItem and adds the new list item 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) Deletes an existing item.
  • onError(errorData) An error handler.
  • onUpdate(item,insertedInto) Updates an existing list item when a data item has been modified.

Properties

append

If true, refresh() does not clear the existing items.

childrenProperty

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

itemMap

An optional parameter mapping field names from the store to ItemList names. Example: itemMap:{text:'label', profile_image_url:'icon'}

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

_createItemProperties(item)

Creates list item properties.

Parameter Type Description
item Object
Returns:object
_setDirAttr(props)

Set the 'dir' attribute to support Mirroring. To be implemented by the bidi/_StoreLisMixin.js

Parameter Type Description
props undefined
Returns:undefined
_setQuery(query,queryOptions)
Parameter Type Description
query String
queryOptions Object
buildRendering()
createListItem(item)

Creates a list item widget.

Parameter Type Description
item Object
Returns:instance
destroy()
generateList(items)

Given the data, generates a list of items.

Parameter Type Description
items Array
itemRenderer()

The class used to create list items. Default is dojox/mobile/ListItem.

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)

Calls createListItem and adds the new list item when a new data item has been added to the store.

Parameter Type Description
item Object
insertedInto Number
onComplete(items)

A handler that is called after the fetch completes.

Parameter Type Description
items Array
onDelete(item,removedFrom)

Deletes an existing item.

Parameter Type Description
item Object
removedFrom Number
onError(errorData)

An error handler.

Parameter Type Description
errorData Object
onUpdate(item,insertedInto)

Updates an existing list item when a data item has been modified.

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