1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    26
    Vote Rating
    1
    Reggae is on a distinguished road

      0  

    Default Ext.ComponentQuery.query() only creates an empty array

    Ext.ComponentQuery.query() only creates an empty array


    I'm just migrating a large Application from ExtJs 3 to ExtJs 4 and I'm annoyed by one problem.

    The application consists of a lot of classes named according to an MVC approach. For example (MyApp.Domain.View.PersonView).
    If I try to refer to an Object which I can easily find by stepping up in the object-hierarchy from one ownerCt to the next one with Ext.ComponentQuery.query(<itemId of the searched Object>) I always get an empty Array back.

    What did I misunderstood concerning Ext.ComponentQuery.query()?

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    does your itemId contain periods?

  3. #3
    Sencha User
    Join Date
    Aug 2007
    Posts
    100
    Vote Rating
    0
    michiel is on a distinguished road

      0  

    Default


    I have a similar problem, where the alias of for example a view contains a period (e.g. widget.module1.tree). Is it correct that this doesn't work with the Component query?

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    yes. You should use underscores.

  5. #5
    Sencha User
    Join Date
    Aug 2007
    Posts
    100
    Vote Rating
    0
    michiel is on a distinguished road

      0  

    Default


    Personally I would prefer to use periods, but underscores will work too. Anyway, good to know it now, at least

  6. #6
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,361
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Yeah, me too. Mainly because my IDE recognizes class names in strings. :-\

Similar Threads

  1. Ext.ComponentQuery.query() not working
    By ashish01 in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 7 Sep 2012, 4:45 AM
  2. ComponentQuery: search tools array
    By htammen in forum Ext: Discussion
    Replies: 2
    Last Post: 26 Feb 2011, 2:04 PM
  3. [OPEN-759] Ext.ComponentQuery.query() Epic Fail!
    By gcallaghan in forum Sencha Touch 1.x: Bugs
    Replies: 0
    Last Post: 3 Feb 2011, 5:50 PM
  4. [solved] empty json creates a selectable row in grid
    By kenITR in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 29 Aug 2007, 3:00 PM

Thread Participants: 2