Hello,
my tree data is defined within JSON file:
navigationTree.json
Code:
{
'success': true,
'results': [{
text:'Main node 1',
expanded: true,
children:[{
text:'Absolute',
id:'absolute',
leaf:true
},{
text:'Accordion',
id:'accordion',
leaf:true
},{
text:'Anchor',
id:'anchor',
leaf:true
},{
text:'Border',
id:'border',
leaf:true
}]
},{
text:'Main node 2',
children:[{
text:'Aaaaa',
id:'center',
leaf:true
}]
},{
text:'Main node 3',
children:[{
text:'Absolute Layout Form',
id:'abs-form',
leaf:true
},{
text:'Tabs with Nested Layouts',
id:'tabs-nested-layouts',
leaf:true
}]
}
]
}
Store is defined as
NavigationTrees.js
Code:
/*
Ext.define('Doprava.store.NavigationTrees', {
extend: 'Ext.data.TreeStore',
storeId: 'navigationTreeStore',
requires: 'Doprava.model.NavigationTree',
model: 'Doprava.model.NavigationTree'
});
*/
Ext.define('Doprava.store.NavigationTrees', {
extend: 'Ext.data.TreeStore',
autoLoad:true,
//model:'NavigationTree',
proxy: {
type: 'ajax',
url: 'data/navigationTree.json',
reader: {
type: 'json',
root: 'results'
}
}
});
Navigation View panel
Code:
Ext.define('Doprava.view.NavigationTreePanel', {
extend: 'Ext.tree.Panel',
alias: 'widget.navigationTreePanel',
height: 250,
width: 400,
title: 'Tree',
height: 210,
width: 352,
layout:'fit',
store: 'NavigationTrees',
root: {},
rootVisible: false
});
When I run above code, I get infinite tree loop, please see attached picture.
tree-loop.jpg
Any idea what can cause it?
Thanks,
Tomas