Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda