Unanswered: Load tree nodes from different URLs in Tree panel
Unanswered: Load tree nodes from different URLs in Tree panel
Extjs 4.1
Hi, here is what I want help to achieve:
1- Load parent nodes by ajax request to a json file e.g. URL of the parent nodes json file is parentNodes.json
[
{"id":1,"text":"Node1","url":"","depth":"0","path":"Node1/node1Childern.json"},
2- Once the parent nodes loaded then on parent node expand (when user clicks to expand the parent node) need to load some other nodes as children of the this parent node by ajax request to a different json file.
e.g. URL for Node1 children Node1/node1Childern.json
[
{"id":3,"text":"Node1Child1","url":"123.html","depth":"1"},
In the beforeload event handler I still can't get the expanded node to know what URL to change to, could you please post some example code showing how to capture the node, and I think I need to access the tree store proxy URL config to change it (Ext.data.proxy.Ajax what I'm using).