Results 1 to 2 of 2

Thread: How to reference items created via Ext.define

  1. #1
    Sencha User
    Join Date
    May 2013

    Default How to reference items created via Ext.define

    I have created a TabPanel via Ext.define
    Ext.define('HelloWorld.view.Home', { extend: 'Ext.TabPanel', xtype: 'homecard', .... });
    Now I would like to reference the TabPanel so that I can dock a button to the right side.

    From what I pieced together from various tutorials, I need to call the getTabBar function on the tabPanel once the TabBar has been created.

    What is the best practice to reference elements created from Ext.define?

  2. #2
    Sencha User blessan's Avatar
    Join Date
    May 2010


    Use Ext.ComponentQuery.query method.
    When you create an instance of your class, add an itemId. So if the itemId is test123. The following command should work


    You can all use the 'up' and 'down' method of any component which will search up and down the heirarchy respectively.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts