ext.jsのツリーパネルにツリーストアをバインドしたいと思います。 私のツリーストア:ext.jsのツリーパネルにツリーストアを動的にバインドしたい4.2
Ext.define('My store', {
extend: 'Ext.data.TreeStore',
autoLoad : true,
model: 'ria.model.system.TreeProgram',
root : {
text : '1depth',
expanded : false
},
proxy: {
type: 'ajax',
url: '/json/programlist.json',
reader: {
type: 'json',
rootProperty: 'children',
successProperty: 'success'
},
listeners: {
exception: function(proxy, response, operation){
// some code
},
load: function(dataStore, rows, bool) {
// some code
}
}
}
},
よく、私は以下のように試みます。 Ext.ComponentQuery.query( '#treePanel')[0] .bindStore(me.store); ここで、 'Ext.ComponentQuery.query('#treePanel ')[0]'はツリーパネルです。 しかし、私はエラーが発生します! ツリーストアをツリーパネルに動的にバインドする方法を教えてください。よろしくです。 よろしくお願いします。
あなたがエラーを取得 - どのようなエラー、PEBCAKエラー? – Alexander
''モデル: '...行の最後に' '、 ''がありません。元のコードにそのタイプミスがあるのですか、ここに貼り付けるだけでエラーになりますか? –