-
13 Jun 2012 7:05 AM #1
Problem with NodeInterface
Problem with NodeInterface
Based on the example for TreePanel, I have a problem.
In this example, I add two nodes with children config property. The second node was created before with NodeInterface etc.
Why does the first node shows its text but not the second?
PHP Code:Ext.define('NodeModel', {
extend: 'Ext.data.Model'
});
Ext.data.NodeInterface.decorate('NodeModel');
var node = Ext.create('NodeModel', {text: 'TestNode'});
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "Node"}, node
]
}
});
Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height: 150,
store: store,
rootVisible: false,
renderTo: Ext.getBody()
});
-
28 Jun 2012 4:29 PM #2
It will be fixed in the next release, just make sure you've declared 'text' in your model's fields:
Code:Ext.define('NodeModel', { extend: 'Ext.data.Model', fields: ['text'] });Marcelo Bukowski de Farias
Sencha
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6523
in
4.1.


Reply With Quote