Results 1 to 2 of 2

Thread: Extjs ComponentQuery query selector

  1. #1
    Sencha User
    Join Date
    Oct 2015
    Posts
    9
    Vote Rating
    2
      0  

    Default Answered: Extjs ComponentQuery query selector

    I have 3 query statments where I query for 3 elements and mask them:


    Code:
      
         Ext.ComponentQuery.query('Notepanel')[0].mask()
         Ext.ComponentQuery.query('[itemId=bannerTopP]')[0].mask();
         Ext.ComponentQuery.query('[itemId=bannerBottomP]')[0].mask()
    Is there a way to combine all of these and make it into a single statement in the `query` to mask all 3?

  2. Hi--

    You could combine all the selectors into one query, and then loop over the results:

    Code:
    var matches = Ext.ComponentQuery.query('Notepanel, [itemId=bannerTopP], [itemId=bannerBottomP]');
    // loop over array to do what needs to be done
    Thanks!
    Joel

  3. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446
    Vote Rating
    186
      0  

    Default

    Hi--

    You could combine all the selectors into one query, and then loop over the results:

    Code:
    var matches = Ext.ComponentQuery.query('Notepanel, [itemId=bannerTopP], [itemId=bannerBottomP]');
    // loop over array to do what needs to be done
    Thanks!
    Joel

Similar Threads

  1. Replies: 3
    Last Post: 16 Jun 2013, 8:16 AM
  2. [FIXED] ComponentQuery with advanced attribute selector
    By wirtsi in forum Sencha Touch 2.x: Bugs
    Replies: 5
    Last Post: 10 Feb 2013, 8:08 PM
  3. Replies: 0
    Last Post: 25 Sep 2011, 10:07 PM

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
  •