PDA

View Full Version : Why does store load twice?



paseo
30 Oct 2012, 11:45 PM
I create a treepanel like this:

var store = Ext.create('Ext.data.TreeStore', {
fields:[...],
proxy:{
type:'ajax',
url:'url',
reader:'json'
}, autoLoad: false});
var tree = Ext.create('Ext.tree.Panel',{
renderTo: Ext.getBody(),
store: store,
...other settings...});The store load remote data twice every page load.Why? And how to avoid ?

grgur
31 Oct 2012, 2:02 AM
The answer is not in that very bit of code. Use Webkit inspector or Firebug to detect when load method is executed.

You can visit these to learn more about inspector:
http://www.youtube.com/watch?v=nOEw9iiopwI
http://jtaby.com/2012/04/23/modern-web-development-part-1.html