Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJSIV-6523 in 4.1.
  1. #1
    Sencha Premium Member
    Join Date
    Jul 2011
    Posts
    18
    Vote Rating
    0
    jonas007 is on a distinguished road

      0  

    Default 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: {        
              
    expandedtrue,        
              
    children: [           
                    { 
    text"Node"},  node       
               
    ]   
          }
    });
    Ext.create('Ext.tree.Panel', {    
          
    title'Simple Tree',    
          
    width200,    
          
    height150,   
          
    storestore,    
          
    rootVisiblefalse,    
         
    renderToExt.getBody()
    }); 

  2. #2
    Sencha - Ext JS Dev Team marcelofarias's Avatar
    Join Date
    Nov 2011
    Posts
    12
    Vote Rating
    0
    marcelofarias is on a distinguished road

      0  

    Default


    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