ExtJS – ComponentQuery / show or hide components

By 19. Oktober 2012 general No Comments

Get Cardlayout and set the active item.
Important is that Ext.ComponentQuery.query(); gives you an array:

var resultType = Ext.ComponentQuery.query('panel[id=cardlayout]');
resultType[0].getLayout().setActiveItem(2);

show or hide container:

var resultContainer = Ext.ComponentQuery
.query('resultContainer');
resultContainer[0].hide(); or .show()

Leave a Reply