Question

     Mag.NewLightboxForm = Ext.extend(Ext.form.FormPanel, {
             initComponent: function () {
                 this.items = [{
                         fieldLabel: 'Select Image',
                         name: 'img',
                         //xtype: 'magcombo',
                         xtype: 'button',
                         id: 'selectlightboximage',
                         store: mageditcontentcombostore,
                         //hiddenName: 'type',
                         listeners: {
                                'render': function() { window.ele = this; }
                         }]
                 }
             });

In Ext 3.3, ele references the EXT Element. I'm trying to get the reference to NewLightboxForm dynamically so I can access .win and .hide() it.

Was it helpful?

Solution

Specify the scope in the listener:

{
    render: function() {},
    scope: this
}

In the function, this will now point to the NewLightBoxForm instance.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top