I have two ExtJs TreePanel. One tree is fully loaded (call it FLTree) and second one is partially loaded (call it PL tree). When user clicks on a node in fully loaded tree & that node is present in partially loaded tree, I want to fire the checkchange event for that node in partially loaded tree.
Is this possible?
Yes,
From the record variable you can get the data needed from the first tree's selected node.Ext.tree.Panel
has theitemclick
event which is fired when an item is clicked (you need to add it in the controller or in the treepanel's listeners property. The attributes are:To find the other treepanel you can use the
up()
anddown()
methods on the treeview:you can walk up in the component hierarchy (get that parent container which contains both treepanels).
If the two treepanel doesn't have common parent, then you can use the
global method which returns an array of matched components. BUT make sure that you use a good component selector query (you can check if the returned array's length == 1).Finally you need to use the
pLtree.fireEvent('checkchange', ...);
which is described HERE.