jquery - Error in setValue on overriding afterRender method of combobox. extjs -


my code combobox below

{     xtype: 'combobox',     id: 'menuitemscombo',     fieldlabel: "items",     name: 'menuitem',     store: this.itemsstore,     valuefield: 'id',     displayfield: 'longname',     editable: false,     emptytext: 'none',     typeahead: false,     multiselect: true,     querymode: 'local',     tabindex: 25,     labelwidth: 195,     fieldcls: 'text-field-height-style',     forceselection: false,      listconfig: {      loadingtext: '',      loadingcls: 'x-wrap-cls x-mask'     },     cls: 'combobox-taxesedit' }     

i have below afterrender method overridden combobox in file.

afterrender: function () {     try {         if (this.store) {             if (this.store.superclass.$classname == "data.store" || this.store.superclass.$classname == "ext.data.chainedstore") {                 if (this.store.isloaded() == false && this.store.isloading() == false)                     //if (this.store.superclass.$classname == "data.estore")                     this.store.load();             }         }         var emp;         if (this.up('form')) {             emp = this.up('form').getrecord();         }         if (emp) {             var modelrecord = emp.data[this.name];             if (array.isarray(modelrecord)) {                 var recordarray = new array();                 (var = 0; < modelrecord.length; i++) {                     if (modelrecord[i])                         if (modelrecord[i].id)                             recordarray.push(modelrecord[i].id);                 }                 this.setvalue(recordarray);             } else if (ext.isobject(modelrecord)) {                 this.setvalue(modelrecord.id);             }         };         this.callparent(arguments);         this.sethiddenvalue(me.value);     } catch (ex) {      } } 

i not able trace exact problem on debugging seems near

this.setvalue(recordarray); 

since found when length of recordarray 0, code below not executed , debugger comes out of try block.

i not sure exact problem id facing problem after upgraded sencha version 6.0.2 6.2. error getting in ext-all-rtl-debug.js

 [e] error while running task - typeerror: cannot read property 'length' of null caller: function () {     var me = this,         items = me.items.getrange(),         = 0,         len = items.length,         anim;     //ext.log('      executing anim runner task ', len, ' items');     me.targetarr = {};     // single timestamp animations interval     me.timestamp = new date();     // loop start new animations first before looping     // execute running animations (which include animations     // started in loop). subtle difference     // iterating in 1 loop , starting running each animation,     // separating loops necessary ensure new animations     // kick off prior existing ones regardless of array order.     // otherwise in edge cases when there excess latency in overall     // performance, allowing existing animations run before new ones can     // lead dropped frames , subtle race conditions when     // interdependent, case element fx.     (; < len; i++) {         anim = items[i];         if (anim.isready()) {             //ext.log('starting anim ', anim.id, ', target: ', anim.target.id);             me.startanim(anim);         }     }     (i = 0; < len; i++) {         anim = items[i];         if (anim.isrunning()) {             //ext.log('      running anim ', anim.target.id);             me.runanim(anim);         }     }     //else if (!me.usecss3) {     // when using css3 transitions animations paused since not     // needed once transition handed on browser, can     // ignore case. if doing js animations ,     // paused here it's possibly unintentional.     //ext.log(' (i)  anim ', anim.id, ' active not running...');     //}     // apply pending changes targets     me.applypendingattrs();     // avoid retaining target references after finished anims     me.targetarr = null; } 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -