Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS 4 - Never cache tree nodes in tree panel

I have a simple Ext.tree.Panel, which loads its data from a Ext.data.TreeStore using an ajax proxy.

The default behavior when expanding a treenode seems to be:

  • if expanded before: retrieve from cache
  • if never expanded: retrieve from server

How can I turn off the caching option, so that it never caches (i.e. always retrieve from server)?

like image 944
Zurb Avatar asked Sep 18 '12 10:09

Zurb


1 Answers

Put this as a listener in the store to get the desired behavior:

collapse: function(node){
    node.removeAll();
    node.set("loaded", false);
}
like image 178
Reimius Avatar answered Nov 15 '22 05:11

Reimius