Clay Banks
Clay Banks

Reputation: 4591

Using ComponentQuery to find a certain Component - extjs

I'm using a controller to initialize a function when a certain panel is rendered. How can i use the ComponentQuery to detect the exact panel without using 'parent > child' finders?

Here's the code:

Ext.define('MC.controller.Description', {
    extend: 'Ext.app.Controller',
    init: function() {
        this.control({
            '**what goes here?**': {
                render: this.onPanelRendered
            }
        });
    },

    onPanelRendered: function() {
        console.log('PANEL WAS RENDERED WHOOO');
    }
});

Upvotes: 0

Views: 149

Answers (1)

Reimius
Reimius

Reputation: 5712

use itemId and then do lookups using queryById

Upvotes: 1

Related Questions