I'm trying to use code found in the laout-browser example.
I've set up a Panel with a card layout and defined two states for the panel:
I can set the 'activeItem' as 0 or 1 in the config and it works fine.
However I want to be able to control the Panel from another Panel. On a panel (called 'tab') which has tabs I've tried to set up this listener:
However when I try to run that the whole window which is displaying my panels does not render at all.Code:tab.on('tabchange', function (tab, activatedTab) { var comp = Ext.getCmp('eastCentre'); comp.layout.setActiveItem(1); });
I've found out that I can execute up to:
But as soon as I try to execute setActiveItem it fails. Firebug says setActiveItem is not a function. But it's used in line 68 of the layout-browser.js file! How am I supposed to remotely set the active item in the Panel which has a card layout?Code:var panelLayout = Ext.getCmp('eastCentre').layout;