View Full Version : TreeStore: How to reload TreeStore without calling DELETE to each node

31 Oct 2011, 12:11 PM

I am changing extraParams on my store proxy on the fly and need just to reload the tree.
I had my clearOnLoad: true and after I call store.load() I had my tree refreshed.

But after some changes in ExtJS release it is trying to call destroy to each node element if I have clearOnLoad: true.

Is it a bug and I should report it to ExtJS or it is new feature? If it is new feature how to clear TreeStore without calling destroy to each node?

removeAll() method on TreeStore doesn't work.


31 Oct 2011, 2:52 PM
Please explain what you think reload means as this is not very clear from what you're saying.

You can load a TreeStore and choose to clear it first or not. If you clear it first that means calling destroy on the nodes in the tree. How is this a problem?

31 Oct 2011, 3:06 PM
For example, I change extraParams in store Proxy and then I call load again. And, when it loads, I need completely reload the store, not add to the store. Previously, I set clearOnLoad: true and that worked perfectly for me until latest changes in ExtJS. Right now when clearOnLoad is true when I call TreeStore load() it seems trying create request and call server side for some reason.

31 Oct 2011, 3:40 PM
I ran into this bug and now you make complete sense! Sorry for being slow.


Let's hope they fix it in the next release.

31 Oct 2011, 4:35 PM
It is a known bug... post (http://www.sencha.com/forum/showthread.php?151211-Reloading-TreeStore-adds-all-records-to-store-getRemovedRecords&p=661157#post661157)