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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -