Class: DataSourceManager

WinJSContrib.UI.DataSources. DataSourceManager

helper class to manage an array with filter and grouping facilities and plug it into listview with or without semantic zoom. This is a low level helper object, it's likely that relying on WinJSContrib.UI.SemanticListViews will be easier.

new DataSourceManager(options)

Parameters:
Name Type Description
options Object
Source:
Example
{@lang javascript}
var datamgr = new WinJSContrib.UI.DataSources.DataSourceManager({
   defaultGroupLimit: 12,
   groupKind: WinJSContrib.UI.DataSources.Grouping.byField,
   field: 'metadata.genre',
   listview: page.zoomedInList,
   zoomedOutListView: page.zoomedOutList
});

Members

defaultGroupLimit :number

no grouping if items.length < defaultGroupLimit

Type:
  • number
Source:

field :string

path to the field to use for groupings

Type:
  • string
Source:

filter :function

item filter callback

Type:
  • function
Source:

groupedList :WinJS.UI.ListView

listview for grouped items

Type:
  • WinJS.UI.ListView
Source:

groupKind :function

groupKind grouping manager function

Type:
  • function
Source:

items :Array

data items

Type:
  • Array
Source:

listview :WinJS.UI.ListView

items listview

Type:
  • WinJS.UI.ListView
Source:

Methods

attach()

attach listviews to data

Source:

detach()

detach listviews from data

Source:

init()

initialise data

Source:

parentSemanticZoom() → {WinJS.UI.SemanticZoom}

get parent semantic zoom control

Source:
Returns:
Type
WinJS.UI.SemanticZoom

prepareItems(items)

clean-up, initialise data and bind listviews to data

Parameters:
Name Type Description
items Array
Source: