1. Method 1
var tree = L5.getCmp(' edocOutfileRelationTree');
//Add selection tree, nodes will automatically collapse
tree.on("click", function(node,e){
node.getUI().toggleCheck(true);
});
tree.root.expand();
2. Method 2
var tree = L5.getCmp('orgstrutree');
//Add a selection tree and the nodes will automatically collapse
tree.on("click" , function(node,e){
if(node.expanded==false){
node.expand();
}else{
node.collapse();
}
});
Used in conjunction with:
var tree = L5.getCmp('orgstrutree');
//Add selection tree, nodes will automatically collapse
tree.on("click", function(node,e){
var organType = node.record.get("organType");
if(organType == "8"){
node.getUI().toggleCheck(true);
}else{
if(node.expanded==false){
node.expand();
}else{
node.collapse();
}
}
});
} >