This is actually the βnormalβ way suggested in the documentation. Look at any of the tree examples .
Basically you create Ext.data.TreeStore with a proxy server, for example. Ext.data.proxy.Ajax :
xtype: 'treepanel', loadMask: {msg: 'Loading...'}, store: Ext.create('Ext.data.TreeStore', { proxy: { type: 'ajax', url: 'get-nodes.php' } })
Each time the user extends one of the nodes, the URL will be hit by the node parameter set to the id of the extended node and should return an array of children of this node. These children should not have the property of children, otherwise they will be considered already loaded and will not be loaded during expansion.
source share