20 Oct 2012 11:02 AM #1
Unanswered: 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  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;
When I try to pull the whole result array using dev console and look up findPlanNavBtn I only see one result, not 8
22 Oct 2012 5:03 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Are all 8 instances using the id 'planNavBtn'?
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Oct 2012 7:04 AM #3
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]')