Results 1 to 3 of 3

Thread: help on updating multiple instances of a button label across the app

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    40
    Vote Rating
    0
      0  

    Default help on updating multiple instances of a button label across the app

    hello all. I have a option button that appears on all screens (8 screens total). once the data comes back from the proxy I want to update the button label and the icon src. How do you do a component query and and then update all the results. currently using [0] updates the first

    when I try to pull the whole result array I only see one result, not 8

    var findPlanNavBtn = Ext.ComponentQuery.query('#planNavBtn');
    var planNavBtn = findPlanNavBtn[0];


    planNavBtn.setIcon('resources/images/rightArrow.png');
    planNavBtn.setIconAlign('right');
    }


    When I try to pull the whole result array using dev console and look up findPlanNavBtn I only see one result, not 8

    any ideas

    Jeff

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    Are all 8 instances using the id 'planNavBtn'?
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    40
    Vote Rating
    0
      0  

    Default

    we are using itemId instead as we have multiple instances. Also I tried using a custom attribute like name = planNavBtn and in the code changed the query to ('button[name=planNavBtn]')

Posting Permissions

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