Hybrid View
-
16 Nov 2012 2:31 AM #1
Unanswered: tree store append child
Unanswered: tree store append child
I populate a tree panel with a static treeStore that not have a specific model or reader(i don't need server to populate the store becauce i populate dynamicly).when i try to append child to the root for example with this syntax:
expressionsStore.getRootNode().appendChild({ leaf:false,
text:'hello',
name:'test',
param:'param3',
isParam:true
})
the node is added but the raw property of the childNode is undifined and i can't access to the property 'param' for example.Any body has an idea to resolve this problem?thx
-
16 Nov 2012 4:41 PM #2
You should use a model or at least use fields config to include all fields you need for a node.
Code:var store = Ext.create('Ext.data.TreeStore', { fields: [{ name: 'text', type: 'string' },{ name: 'name', type: 'string' },{ name: 'param', type: 'string' },{ name: 'isParam', type: 'boolean' }], ... });


Reply With Quote