dojox/mobile/_DataListMixin (version 1.10)

dojox/mobile/_DataMixin

Summary

Mixin for widgets to generate the list items corresponding to the 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/_DataListMixin reference documentation for more information.

Property Summary

  • appendIf true, refresh() does not clear the existing items.
  • itemMapAn optional parameter mapping field names from the store to ItemList name.
  • 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

  • onComplete(items,request) An handler that is called after the fetch completes.
  • onDelete(deletedItem) See dojo/data/api/Notification.onDelete().
  • onError(errorData,request) An error handler.
  • onNew(newItem,parentInfo) See dojo/data/api/Notification.onNew().
  • onSet(item,attribute,oldValue,newValue) See dojo/data/api/Notification.onSet().
  • onStoreClose(request) Refresh list on close.

Properties

append

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

itemMap

An optional parameter mapping field names from the store to ItemList name.

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 undefined
queryOptions undefined
buildRendering()
createListItem(item)

Creates a list item widget.

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

Given the data, generates a list of items.

Parameter Type Description
items Array
dataObject Object
itemRenderer()

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

refresh()

Fetches the data and generates the list items.

Returns:null | instance
setQuery(query,queryOptions)

Sets a query.

Parameter Type Description
query dojo/data/api/Request | Object
queryOptions Object
Optional
Returns:undefined
setStore(store,query,queryOptions)

Sets the store to use with this widget.

Parameter Type Description
store dojo/data/store
query dojo/data/api/Request | Object
queryOptions Object
Optional
Returns:null | undefined

Events

onComplete(items,request)

An handler that is called after the fetch completes.

Parameter Type Description
items Array
request Object
onDelete(deletedItem)
Parameter Type Description
deletedItem Object
onError(errorData,request)

An error handler.

Parameter Type Description
errorData Object
request Object
onNew(newItem,parentInfo)
Parameter Type Description
newItem Object
parentInfo Object
Optional
onSet(item,attribute,oldValue,newValue)
Parameter Type Description
item Object
attribute String
oldValue Object | Array
newValue Object | Array
onStoreClose(request)

Refresh list on close.

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