View Full Version : Expand Particular Node in Tree Panel on Load

4 Sep 2013, 1:41 AM
Hi Sencha,

I am facing an issue

There are five nodes ( Production , Archieved, Draft, PendingReview, Rejected) in a Tree Panel Store. Based on the some conditions, i want to expand Production node on the load. I have put below two methods and the Production node is getting expanded, but also getting a js error ( "internalId " is null or not an object ).

Ext.getCmp('RuleSetTreePanel').store.getNodeById('Production').bubble(function (node) { node.expand() });


Please provide the solution without any js Error.

Thanks in advance,
Pawan Chand

4 Sep 2013, 8:04 AM
Try your variants with animation disabled - I had similar issue when several items are collapsing/expanding.

4 Sep 2013, 8:25 AM
I use the tree.expandPath() method, and I do not get any JS errors. BTW, I wanted the node to actually be selected and not just expanded, so in addtion to tree.expandPath(), I also use tree.selectPath().

Which version of Ext are you using? I have not seen this issue with 4.1.1, 4.2.0, or 4.2.1. You should also post your entire code block.

4 Sep 2013, 10:19 PM
ExtJs version - 4.1.1

Code here :

// Tree View
treeRuleSet = new Ext.tree.TreePanel({
store: treeStore,
rootVisible: false,
height: 562,
title: 'Select a RuleSet',
autoScroll: true,
id: 'RuleSetTreePanel',
singleExpand: true,
singleSelection: true,
frame: true,
listeners: {
load: function (node) {
// Expand Production Node
}); //end tree panel