Class idx.widget.CheckBoxTree


Extends dijit.Tree.
idx.widget.CheckBoxTree extended dijit.Tree with indirect selection. It supports both dijit.ForestStoreModel and dijit.TreeStoreModel. The check states of the checkboxes is implemented according to IBM One UI(tm) Check Boxes Standard In addtion, DND feature is avaible for both standard CheckBoxTree and Forest CheckBoxTree . Note: DND feature is not compliant with server side store such as JSON REST store.

Example: CheckBoxTree with dijit.tree.TreeStoreModel & DnD feature off

<div data-dojo-id="continentStore" data-dojo-type="dojo.data.ItemFileWriteStore" data-dojo-props='url:"_data/countries.json"'></div>
<div data-dojo-id="continentModel" data-dojo-type="dijit.tree.TreeStoreModel" data-dojo-props='store:continentStore, query:{id:"ROOT"}, rootId:"continentRoot", rootLabel:"Continents", childrenAttrs:["children"]'></div>
<div id="mytree" data-dojo-type="idx.widget.CheckBoxTree" data-dojo-props='model:continentModel, autoExpand:true, openOnClick:true, onLoad:function(){ console.log("loaded mytree (first tree)"); }'>
Example: CheckBoxTree with DnD feature on
<div data-dojo-id="continentStore" data-dojo-type="dojo.data.ItemFileWriteStore" data-dojo-props='url:"_data/countries.json"'></div>
<div data-dojo-id="continentModel" data-dojo-type="dijit.tree.TreeStoreModel" data-dojo-props='store:continentStore, query:{id:"ROOT"}, rootId:"continentRoot", rootLabel:"Continents", childrenAttrs:["children"]'></div>
<div id="mytree" data-dojo-type="idx.widget.CheckBoxTree" data-dojo-props='model:continentModel, autoExpand:true, openOnClick:true, dragThreshold:8, betweenThreshold:5, dndController: "idx.widget.checkboxtree.dndSource", onLoad:function(){ console.log("loaded mytree (first tree)"); }'></div>

Defined in: <idx\widget\CheckBoxTree.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
Get Selected Item through the _itemStatus array return an array with value of selected item
 
onNodeStateChange(node, checked)
Event triggered when the state of a node changed.
 
Aspect the function of _expandNode
 
 
toggleNode(item, checked)
Toggle the checkbox of the given tree node.

Constructor Detail

idx.widget.CheckBoxTree()

Method Detail

getSelectedItems()

Get Selected Item through the _itemStatus array return an array with value of selected item

onNodeStateChange(node, checked)

Event triggered when the state of a node changed.
Parameters:
{oneui._TreeNode} node
{Boolean} checked

postCreate()

Aspect the function of _expandNode

postMixInProperties()


toggleNode(item, checked)

Toggle the checkbox of the given tree node. Happened on DnD drop finished
Parameters:
{String|oneui._TreeNode} item
{Boolean|String} checked