dojox/mobile/LongListMixin (version 1.10)

Summary

This mixin enhances performance of very long lists contained in scrollable views.

LongListMixin enhances a list contained in a ScrollableView so that only a subset of the list items are actually contained in the DOM at any given time. The parent must be a ScrollableView or another scrollable component that inherits from the dojox.mobile.scrollable mixin, otherwise the mixin has no effect. Also, editable lists are not yet supported, so lazy scrolling is disabled if the list's 'editable' attribute is true. If this mixin is used, list items must be added, removed or reordered exclusively using the addChild and removeChild methods of the list. If the DOM is modified directly (for example using list.containerNode.appendChild(...)), the list will not behave correctly.

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

Property Summary

  • maxPagesWhen this limit is reached, previous pages will be unloaded.
  • pageSizeItems are loaded in the DOM by chunks of this size.
  • unloadPagesNumber of pages that will be unloaded when maxPages is reached.

Method Summary

Properties

maxPages

When this limit is reached, previous pages will be unloaded.

pageSize

Items are loaded in the DOM by chunks of this size.

unloadPages

Number of pages that will be unloaded when maxPages is reached.

Methods

_addAfter()
Returns:boolean
_addBefore()
Returns:boolean
_adjustBottomDiv(newBox)
Parameter Type Description
newBox undefined
_adjustTopDiv(oldBox,newBox)
Parameter Type Description
oldBox undefined
newBox undefined
_childrenChanged()
_clearItems()
_getSiblingOfChild(child,dir)
Parameter Type Description
child dijit/_Widget
dir int
Returns:undefined
_loadItems(toPos)
Parameter Type Description
toPos undefined
_reloadItems()
addChild(widget,insertIndex)
Parameter Type Description
widget dijit/_Widget
insertIndex int
Optional
generateList(items)

Overrides dojox.mobile._StoreListMixin when the list is a store list.

Parameter Type Description
items Array
getChildren()
Returns:undefined
removeChild(widget)
Parameter Type Description
widget Widget | int
resize()
startup()
Error in the documentation? Can’t find what you are looking for? Let us know!