PDA

View Full Version : 'toFront()' not working, zIndexManager is undefined



hermann.s
26 Aug 2013, 3:41 AM
Hi,

I have two Containers that are added to a Panel. I want to be able to switch between the two Containers depending on user actions. I start by bringing the default container 'toFront()'.

However, it does not seem to work. The last line of this excerpt throws the error of zIndexManager is undefined :



Ext.define('MainPanel', {
singleton: true,

current : null
});

Ext.define('ContainerList', {
singleton : true,

current : null,
taskContainer: null,
searchContainer: null
});

MainPanel.current = new Base.Panel();

ContainerList.taskContainer = new Base.Container('@BFE.Frontend.MyTask.Container');
ContainerList.searchContainer = new Base.Container('@BFE.Frontend.Search.Container');
ContainerList.current = ContainerList.taskContainer;

MainPanel.current.add(ContainerList.taskContainer);
MainPanel.current.add(ContainerList.searchContainer);

ContainerList.current.toFront();

Phil Guerrant
26 Aug 2013, 5:06 AM
toFront() is only for floating (http://docs.sencha.com/extjs/#!/api/Ext.Component-cfg-floating) components. It sounds like what you want is a card (http://docs.sencha.com/extjs/#!/api/Ext.layout.container.Card) layout