Class: SC.TreeController


Extends SC.ObjectController, SC.SelectionSupport.

A TreeController manages a tree of model objects that you might want to display in the UI using a collection view. For the most part, you should work with a TreeController much like you would an ObjectController, except that the TreeController will also provide an arrangedObjects property that can be used as the content of a CollectionView.

Defined in: tree.js

Since:
SproutCore 1.0

Field Summary

Field Detail

arrangedObjects SC.Array

Returns an SC.Array object that actually will represent the tree as a flat array suitable for use by a CollectionView. Other than binding this property as the content of a CollectionView, you generally should not use this property directly. Instead, work on the tree content using the TreeController like you would any other ObjectController.

treeItemChildrenKey String

Set to the name of the property on your content object that holds the children array for each tree node. The default is "treeItemChildren".

Default value:
"treeItemChildren"
treeItemIsExpandedKey String

If your content support expanding and collapsing of content, then set this property to the name of the key on your model that should be used to determine the expansion state of the item. The default is "treeItemIsExpanded"

Default value:
"treeItemIsExpanded"
treeItemIsGrouped Boolean

Set to YES if you want the top-level items in the tree to be displayed as group items in the collection view.

Default value:
NO
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:21 GMT-0600 (CST)