Reputation: 167
I have a question about simple button.
Below definition:
var table = null;
var buttonConfig = {
buttonId: 'mybutton1',
text: 'Template button',
icon: 'style/img/fam/button.png',
tooltip: 'template button',
handler: function () {
var someConfig = null;
fileProcessing(someButton, someConfig);
}
};
addButtonToGrid(table, buttonConfig);
Function called fileProcessing
has 2 args - someButton
and someConfig
.
I want to pass in someButtton
, the button from object buttonConfig
. How should I do it ?
Thanks for any advice
Upvotes: 0
Views: 92
Reputation: 1410
You can do it like below:
handler: function () {
var someConfig = null;
var someButton = this;
fileProcessing(someButton, someConfig);
}
PARAMETERS
button : Ext.button.Button
This button.
e : Ext.event.Event
The click event.
Hope this will help/guide you.
Upvotes: 1