ramana_l_v
28 Jun 2012, 11:03 AM
Hi,
I have a container with card layout and two components in it. By default active item is 0.
Issue I am facing is activate listener for the components inside mycomponent2 are getting called when the page is loaded where active item is set to mycomponent1.
When I set active item to 1 activate listener of mycomponent2 is getting called but the activate listeners for the components inside mycomponent2 are not getting called.
What exactly needs to be done where activate listener for the components of mycomponent2 is called only when active item is set to 1 ?
Below is the sample code
Ext.define('MyAdoc.view.MyContainer', {
extend: 'Ext.container.Container',
requires: [
'MyAdoc.view.MyComponent1',
'MyAdoc.view.MyComponent2'
],
height: 355,
width: 530,
activeItem: 0,
layout: {
type: 'card'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'mycomponent1'
},
{
xtype: 'mycomponent2'
}
]
});
me.callParent(arguments);
}
});
Thanks
I have a container with card layout and two components in it. By default active item is 0.
Issue I am facing is activate listener for the components inside mycomponent2 are getting called when the page is loaded where active item is set to mycomponent1.
When I set active item to 1 activate listener of mycomponent2 is getting called but the activate listeners for the components inside mycomponent2 are not getting called.
What exactly needs to be done where activate listener for the components of mycomponent2 is called only when active item is set to 1 ?
Below is the sample code
Ext.define('MyAdoc.view.MyContainer', {
extend: 'Ext.container.Container',
requires: [
'MyAdoc.view.MyComponent1',
'MyAdoc.view.MyComponent2'
],
height: 355,
width: 530,
activeItem: 0,
layout: {
type: 'card'
},
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'mycomponent1'
},
{
xtype: 'mycomponent2'
}
]
});
me.callParent(arguments);
}
});
Thanks