Posted by blogmeister on
October 20, 2012
Since there is no xtype for Ext.navigation.Bar, using Ext.ComponentQuery.query() is out of the question. However, components do have a query() method within them so you only need to get a reference to the navigation bar and you will then be able to get the components you are looking for.
Let us say you want to get all the buttons in the navigation bar, this is how you do it.
var navbar = this.getNavigationBar();
var butt = navbar.query('button');
This will give you an array of all buttons found in your navigation bar. Simple, right?!
Do take note that this query will always have an invisible button inside which is the Back button so the array will always be 1.