javascript - Passing parameters to function before this.control() in Ext-JS 4 -


i have this:

{     listeners['combobox[name="counterparty_id"]'] = {         afterrender: {             fn: this.oncomboboxcounterpartyafterrender,             scope:         }     };            this.control(listeners); }    // function being called after rendering combobox  oncomboboxcounterpartyafterrender: function(combobox, eopts){  // code  }, 

so, how can send additional parameteres oncomboboxcounterpartyafterrender function?

maybe this:

listeners['combobox[name="counterparty_id"]'] = {             afterrender: {                 fn: this.oncomboboxcounterpartyafterrender,                 scope: this,                 params: someparameters             }         }; 

there might better way, can do:

listeners['combobox[name="counterparty_id"]'] = {     afterrender: {         fn: function(combobox, eopts) {             this.oncomboboxcounterpartyafterrender(combobox, eopts, params)         }         ... 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -