0

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

1 Answer 1

1

You can do it like below:

handler: function () {
    var someConfig = null;
    var someButton = this;
    fileProcessing(someButton, someConfig);
}

Reference

PARAMETERS

button : Ext.button.Button

This button.

e : Ext.event.Event

The click event.

Hope this will help/guide you.

Sign up to request clarification or add additional context in comments.

1 Comment

This is it ! Thank you soo much. Soo we can close the topic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.