View Full Version : expandPath() - Creating Duplicates

5 Aug 2013, 6:17 AM
Ext.js 4.2.0.

I have a tree panel that loads content with ajax inside Ext.data.TreeStore. The content loads properly, but I also have a load function to check if a querystring exist (ex. ?docId=5) and to expand the path of the tree to the relevent docId. What I have done allows it to expand to the relevent node, but it creates a duplicate tree. For instance, 2 trees are produced in the same panel, both expanded, but the second tree is unclickable.

Is this an issue with expandPath() or am I doing something that is creating 2 trees.

var store = Ext.create('Ext.data.TreeStore', {
storeId : 'treeStoreId',
proxy: {
type: "ajax",
url: 'URL removed'
/*root: {
expanded: false
listeners: {
load: function() {
if (window.location.search.length) {
queryString = window.location.search.substring(7);
var treePath = this.getNodeById(queryString).getPath();

EDIT: Found a workaround. I added clearListeners() from the TreeStore and it fixed the issue.

Gary Schlosberg
7 Aug 2013, 2:58 PM
Glad to hear you found a solution. If you still feel this is a bug, please post a test case which reproduces the issue. Thanks.