Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    22
    Vote Rating
    0
    shekhar.kotekar is on a distinguished road

      0  

    Default node.updateInfo is not a function while appending node in extjs-4.1.0-gp treepanel

    node.updateInfo is not a function while appending node in extjs-4.1.0-gp treepanel


    I am trying to load data into an extjs 4 TreeStore but while appending node, I am getting node.updateInfo is not a function error.

    I am using ext-4.1.0-gpl version.

    My model classes are as follows :


    Dimension.js
    Code:
    Ext.define('ilp.model.Dimension', {     extend : 'Ext.data.Model',     require : [         'ilp.model.DimensionLevel'     ],     fields : [         'actualName',          'displayName'     ],     hasMany : {model : 'ilp.model.DimensionLevel', name : 'dimensionLevels'} });
    DimensionLevel.js
    Code:
    Ext.define('ilp.model.DimensionLevel', {     extend : 'Ext.data.Model',     fields : [         {name : 'name', type : 'string'},         {name : 'totalTrainees', type : 'int'}     ] });
    and tree store code is as follows :
    Code:
    Ext.define('ilp.store.DimensionTree', {     extend : 'Ext.data.TreeStore',     requires : [         'ilp.model.Dimension',         'ilp.model.DimensionLevel'     ],     model : 'ilp.model.Dimension',      root: {     name: 'Dimensions'     },      proxy: {     type: 'ajax',     url: 'http://localhost:8080/pentaho/content/cda/doQuery',     reader: {             type: 'pentahoReader',         root: 'resultset'     },     extraParams: {         path: 'RINXDashboards%2FCDAs%2FILP_Employee_Qeries.cda',         dataAccessId:'Get_All_Levels_From_All_Dimensions',         userid : 'joe',         password : 'password'     }     },      listeners: {     append : function(parentNode, newNode, index, options) {             if(newNode.get('text') != 'Root') {         console.log('newNode text value = ' + newNode.get('text'));         newNode.set('checked', null);         newNode.set('expandable', true);         if(Ext.ClassManager.getName(newNode) == "ilp.model.Dimension") {             newNode.set('expanded', true);         newNode.set('text', newNode.get('displayName'));         if(newNode.dimensionLevels().getCount() > 0) {             newNode.dimensionLevels().each(function(level) {             newNode.appendChild(level);         });         } else {         newNode.set('leaf', true);               }         }else if(Ext.ClassManager.getName(newNode) == "ilp.model.DimensionLevel") {             newNode.set('leaf', true);         newNode.set('text', newNode.get('name'));         }     }       }     } });
    I am getting above error on following line :
    Code:
     newNode.dimensionLevels().each(function(level) {
    while debugging I have found that updateInfo() method of newNode is undefined.

    After switching back to extjs 4.0.3, same code worked without any modification.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,115
    Vote Rating
    507
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    There's not really enough info here to diagnose this, can you post a locally runnable test case?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    22
    Vote Rating
    0
    shekhar.kotekar is on a distinguished road

      0  

    Default


    Quote Originally Posted by evant View Post
    There's not really enough info here to diagnose this, can you post a locally runnable test case?
    Hi, I think this problem is with 4.1.0 gpl version. I switched back to 4.0.3 version of extjs and same code worked just fine. So I think 4.1.0 gpl version might be the cause of the problem. I have wrote same thing in extjs bugs forum.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar