PDA

View Full Version : Register a listener namespace



djeffersonx
23 Nov 2011, 6:43 AM
Good morning everyone.

I am trying to register a namespace within the event 'beforeRender':

Namespace This code is already tested and works but in another context, I now need to insert it into an event.

When I run the code nothing happens, no error.



(...)
listeners: {
'beforerender':function(){
Ext.namespace('olapPanel');

(...)

olapPanel.Panel.superclass.constructor.call(this, {
renderTo : 'idDoPanelPai',
layout : 'border',
items : [
{
xtype: 'panel',
region: 'north',
height: 300,
items: [this.camposPanel, this.colunasPanel]
},
this.linhasPanel,
this.tabelaPanel
]
});
};

// In the and i instatiate this panel
new olapPanel.Panel();
}
}
(...)

mitchellsimoens
23 Nov 2011, 7:23 AM
You should do this at the start of anything. This is bad practice.