add listener to radio field in sencha -


i creating radiofields in web app programatically checked. trying add listener radio field, listens ''uncheck' event. on getting unchecked want destroy radio field.

the radio field added , created fin on unchecking field following error.

uncaught typeerror: cannot call method 'replace' of null

the code initialising radio field.

var radiofield= ext.create('ext.field.radio',{             id:fieldname,                 checked:true,         label:fieldname,          listeners: {           uncheck: function() {           console.log('destroy');           destroy();         }       } }); ext.getcmp('filterlistfield').add(radiofield); 

i believe name required property radiobox. did , seems work.

var radiofield = ext.create('ext.field.radop', {                     id: fieldname,                     checked: true,                     name:fieldname,                     label: fieldname,                     listeners: {                         'uncheck': function(radio) {                             console.log('destroy');                             radio.destroy();                         }                     }                 });  ext.getcmp('qc23view').add(radiofield); 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -