Posts

Showing posts from November, 2012

ExtJS TreePanel - Get All Leaf Nodes and non-leaf nodes of a Tree in ExtJS

***Get All Leaf Nodes and non-leaf nodes of a Tree*** Hi Friends,  After a long time I am writing this small blog post, currently I am really busy working with Alfresco Foundation API, Alfresco is an Open source CMS and once I get time I have a long pipeline of topics in Alfresco programming to post about. I already have two blog-posts about ExtJS Treepanel, i.e. getting total number of deep-children and getting the array of those all deep-children nodes , this blog-post will be incremental to those previous ones. Sometimes we might need list of nodes of a Tree with some-special condition may be only leaf-nodes, only non-leaf nodes or may be only nodes with some special attribute, so here I have written two functions which can be modified to get your type of list of nodes. 1) Get the list of all leaf nodes (Only leaf nodes - End-nodes) in a Treepanel in ExtJS getDeepAllLeafNodes = function(node,onlyLeaf){ var allNodes = new Array(); if(!Ext.value(node,...