PDA

View Full Version : ButtonGroup not throw render event



kchen001
25 Jul 2012, 12:14 AM
I have a ButtonGroup class and a controller, The ButtonGroup class is used in the ViewPort. The render event won't be fire until I changed the class from extending "Ext.container.ButtonGroup" to "Ext.panel.Panel". (I'm using Ext4.1 for your reference)<br>

<<<<<<<<<<<<<<<<<<<<<<view port>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Ext.define('Bongo.view.Viewport', {
extend: 'Ext.container.Viewport',
xtype:'myViewPort',
id:'myViewPort',
requires: [
'Bongo.view.logon.navigationBar'
],
layout:{
type:'fit',
},
items: [
{
xtype: 'navigationBar'
}
]
});

<<<<<<<<<<<<<<<<<<<<<<navigationBar>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Ext.define('Bongo.view.main.navigationBar',{
extend: 'Ext.container.ButtonGroup',
xtype:'navigationBar',
layout:{
type:'hbox',
align: 'center',
pack: 'center'
},
<<<<<<<<<<<<<<<<<<<<<<view port>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

'navigationBar':{
render:function(){
console.log('render');

}
}

MaximusDecimus
25 Jul 2012, 2:18 AM
where do you Ext.create your objects?

scottmartin
26 Jul 2012, 10:18 AM
You will need to create the object for it to render.

Scott.