View Full Version : ExtJS 4.0.7 Tree Panel not reloading

28 Aug 2014, 4:30 AM

I am using an ExtJS 4.0.7 Tree Panel with remote data. I am facing some issues updating (reloading) the tree panel. Am i using wrong way to reload the Tree panel? Following is the sample code

Ext.create('Ext.tree.Panel', {
hidden: true,
rootVisible: false,
floating: true,
minHeight: 300,
pickerField: this,
store: new Ext.data.TreeStore({
model: 'MyModel',
clearOnLoad: false,
proxy: {
type: 'ajax',
url : 'some/url?param1=param1&param2=param2',
reader: {
type: 'json',
root: 'children',
successProperty: 'success',
totalProperty : 'totalCount'
pageParam: undefined,
startParam: undefined,
pageParam: undefined,
limitParam: undefined
load1: function(param1, param2) {
this.proxy.url = 'some/url?param1='+param1+'&param2='+param2;

Ext.define('MyModel', {
extend: 'Ext.data.Model',
fields: [
{name: 'id', type: 'string'},
{name: 'text', type: 'string'},
{name: 'leaf', type: 'boolean'},
{name: 'expanded', type: 'boolean'},
{name: 'children'}


children: [{children:null, leaf:true, expanded:false, id:id1,},{children:null,...},{},{}..]
statusText: ""
success: true

When i use below command it gives the below error allthough it fetches the data but does not updates the Tree structure

Ext.getCmp('myTreePanel').getStore().load1("param1", "param2");

Uncaught TypeError: Cannot read property 'internalId' of undefined

8 Sep 2014, 4:29 AM