Results 1 to 4 of 4

Thread: How to get the xtype of an instantiated component in EXT-3?

  1. #1

    Default How to get the xtype of an instantiated component in EXT-3?

    I'm trying to get the component using its xtype:

    Code:
    Ext.ComponentQuery.query('myxtype')
    that throws error" Cannot read property 'query' of undefined"
    the 'Ext.ComponentQuery' is undefined din EXT3. Is there any alternative to get the component using the xtype?

  2. #2

  3. #3

    Default

    That post cleary indicated its not for EXT3. I tried that but Ext.QueryComponent gives undefined. I was wondering if there is any alternative to write the same in EXT-3

  4. #4
    Sencha User jdkhamba's Avatar
    Join Date
    Jul 2012
    Posts
    236

    Default

    You can use findByType provided you have a container hierarchy. It is not exactly same as componentquery but close. So you need to make sure that component you are trying to access is part of the items collection and not simply rendered using renderTo.

    http://extjs.cachefly.net/ext-3.2.1/...ner-findByType

Similar Threads

  1. How to get the xtype of an instantiated component in EXT-3?
    By tsensuous.grace in forum Ext 3.x: Bugs
    Replies: 2
    Last Post: 22 Jun 2016, 5:51 PM
  2. set flex for fully instantiated component in Container Panel
    By nish1013 in forum Sencha Touch 1.x: Q&A
    Replies: 1
    Last Post: 11 Apr 2012, 6:22 AM
  3. Load data into form instantiated by xtype
    By mcruise in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 18 Aug 2011, 10:34 AM
  4. Finding out which ExtJS class a component is instantiated from
    By psainsbury in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 5 Aug 2009, 8:20 AM

Posting Permissions

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