Results 1 to 3 of 3

Thread: How to find every component of an xtype?

  1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    58

    Default How to find every component of an xtype?

    Hi all,

    I want to find every store of an xtype on the page. I don't want to use ID's because I can have lots of stores of a defined xtype, and I want to, for example, update every store of a module if an item is created / modified or deleted. And I want to reuse this behaviour with all my modules.

    I don't have a main container. I have a desktop like app with windows, so I can't use a "findByType" method to find childrens of a defined xtype.

    Is there a method like findByType, but that looks for every store (or other components) in the app? I've looked on the API but I couldn't find anything like this.



    Thanks in advance!

  2. #2

    Default

    You can get a MixedCollection of all components by filtering by xtype

    grids = Ext.ComponentMgr.all.filterBy(function(item){
    return item.getXType()=="grid";
    });

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Posts
    58

    Default

    Nice tip! thanks a lot

Similar Threads

  1. Replies: 4
    Last Post: 13 Apr 2011, 12:48 AM
  2. How to get xtype component without id
    By Ex_Soft in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 7 Oct 2010, 11:57 PM
  3. Can you find a Component by name?
    By UGA_Zimma in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 14 Dec 2009, 7:50 PM
  4. [Solved]find xtype
    By nar in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 19 Nov 2009, 12:32 PM
  5. How to find out the ID of the component when clicked?
    By edfimasa in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 13 Nov 2008, 3:24 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
  •