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
Post a Comment