ExtJS 4: TreeStore with both static and dynamically-loaded data?

前端 未结 5 1314
慢半拍i
慢半拍i 2021-02-04 19:18

I\'m making a TreePanel that looks like this:

\"enter

At the moment I have it \"mo

5条回答
  •  自闭症患者
    2021-02-04 19:29

    I believe the node parameter will help you. Set autoLoad: false, then leverage the beforerender event of the actual tree panel. Inside the event call the store's load function, and pass it a node. The docs state that if this is ommited from the load() call, it will default to the root node. It would appear that you could leave your settings in the root node and then by calling load and passing it a child node, you'd be able to update just the users.

    Please see: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.TreeStore-method-load for reference. Note that this load function is not the same as in Ext.data.Store (Ext.data.TreeStore does not inherit from Ext.data.Store).

    I have not had the opportunity to test this, but it seems promising.

提交回复
热议问题