Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
Override Ext.Button OnRender event to enable/disable buttons

I am trying to override onRender event in ExtJS 3.4.0 but this gives a script error: object does not support callParent. My objective is to enable or disable buttons based on the rights from session object.

Ext.override(Ext.Button, {
            onRender: function () {
                this.callParent();

                console.log('do something');
            }
        });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I have resolved with these lines of code:

Ext.onReady(function () {
Ext.QuickTips.init();
// get rights here

if (roles.length > 0) {
    Ext.override(Ext.Button, {
        initComponent: function () {
            //filter rights here with matching text
            // if length is greater than 0, then enable disable buttons
            if (buttonRights.length > 0) {
                if (this.text == buttonRoles[0].ItemText) {
                    this.setDisabled(!roles[0].IsAllowed);
                }
            }
        }
    });
}
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!