1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    56
    Vote Rating
    0
    piccard is on a distinguished road

      0  

    Default node.updateInfo is not a function

    node.updateInfo is not a function


    Hello,

    I bumped into some strange problem, maybe one of you out there can help me.
    I've got a MVC-Application with an accordion, which includes 2 trees. The JSON the trees get looks like this:

    PHP Code:
    {
            
    successtrue,
            
    data: [
                    {
                            
    text'Group 01',
                            
    expandedtrue,
                            
    group_id'1',
                            
    checkedtrue,
                            
    data: [
                                    {
                                            
    text'Node 01',
                                            
    checkedtrue,
                                            
    node_id'1',
                                            
    leaftrue
                                    
    },
                                    {
                                            
    text'Node 02',
                                            
    checkedtrue,
                                            
    node_id'2',
                                            
    leaftrue
                                    
    }
                            ]
                    },
                    {
                            
    text'Group 02',
                            
    expandedtrue,
                            
    group_id'2',
                            
    checkedfalse,
                            
    data: [
                                    {
                                            
    text'Node 01',
                                            
    node_id'1',
                                            
    checkedfalse,
                                            
    leaftrue
                                    
    }
                            ]
                    }]

    I cannot change the root-property (data) cause it's a constraint of the server. To be able to read the properties group_id && node_id I included a treemodel in my store which works pretty good:

    PHP Code:
    Ext.define('DW.store.nodes.GroupedNodesTree', {
        
    extend'Ext.data.TreeStore',

        
    modelExt.define('Treemodel', {
            
    extend'Ext.data.Model',
            
    fields: ['group_id''node_id''text'],
        }), 

         
    constructor: function() {
            
    config Ext.apply(this,{
                    
    proxy: {
                            
    type'ajax'
                            
    url'/static/dw/data/groupedNodesTree.json',
                            
    actionMethods'POST',
                            
    reader: {
                                    
    type'json',
                                    
    root'data',
                                    
    successProperty'success'
                            
    }   
    //                      root: {
    //                              expanded: true
    //                      }
                    
    },  
                    
    folderSorttrue,
                    
    sorters: [{
                            
    property'leaf',
                            
    direction'ASC'
                    
    }, {
                            
    property'text',
                            
    direction'ASC'
                    
    }]  
             }); 
            
    this.callParent(arguments);
        }
    }); 
    So, this is the code for one accordion-item, the other one looks the same, except the name of the store.

    PHP Code:
    Ext.define('DW.store.nodes.NodesTree', {
        
    extend'Ext.data.TreeStore',

        
    modelExt.define('Treemodel', {
            
    extend'Ext.data.Model',
            
    fields: ['group_id''node_id''text'],
        }),
    ... 
    But as soon as I define the model for the other tree I get the error:
    PHP Code:
    node.updateInfo is not a function 
    I have no idea, why I can't define a model for this tree????? I suspect it has something to do with the root-node. As far I understood it, you also have to substitute the chidlren-property with the name of the root, isn't it? But why it works on one item perfectly and the other one throws an error? So if anybody can give me a hint, would be great :-D

    ExtJS-version: 4.07

  2. #2
    Sencha User
    Join Date
    Aug 2009
    Posts
    56
    Vote Rating
    0
    piccard is on a distinguished road

      0  

    Default


    stupid me ... I chose the same model-name: Ext.define('Treemodel', { ...

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi