How can I bind event for all buttons in my ExtJS app?
like JQuery:
$('button').click(function(el) {
console.log($(el).getattr('value'));
});
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Two ways:
If you’re writing a full app following Ext’s MVC pattern, you have to instantiate an
Ext.Applicationand use a controller with code like the followingSample Code
The hacked up way is to do a query and bind a separate handler for each button