View Full Version : .findByType()

8 Aug 2011, 5:12 AM
It is said in the documentation that the first parameter is 'The xtype string for a component, or the class of the component directly'. I just don't get it. Could someone show me a working example? I tried querying the 'form' xtype and it works as it should. And then I tried querying 'Ext.form.FormPanel', 'form.FormPanel' and 'FormPanel' and nothing of those have worked.

8 Aug 2011, 6:48 AM
Oh, sorry guys! I've got it - I have to pass a class object instead of the string.

viewport.findByType(Ext.Panel); //right way
viewport.findByType('Ext.Panel'); //won't work