mercredi 12 novembre 2014

Problems using treestore in viewmodel

If I create a treepanel and bind a treestore from the viewmodel. I get the following error.

Uncaught TypeError: Cannot read property 'isUtilObservable' of null



Code:



treeStore: {
type: 'tree',
proxy: {
type: 'ajax',
url: './json/tree.json',
reader: {
type: 'json'
}
},
fields: [
{
name: 'text'
}
]
}

If I make a similar store outside of the viewmodel it works just fine.

Code:



constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'MyTreeStore1',
proxy: {
type: 'ajax',
url: './json/tree.json',
reader: {
type: 'json'
}
},
fields: [
{
name: 'text'
}
]
}, cfg)]);

Any suggestions would be appreciated.



Problems using treestore in viewmodel

Aucun commentaire:

Enregistrer un commentaire