1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    24
    Vote Rating
    1
    Crockford is on a distinguished road

      0  

    Default Answered: Best way to get a component from a... uhm... collection!

    Answered: Best way to get a component from a... uhm... collection!


    Hi guys,
    I'm sure you know the toolbar component.
    PHP Code:
    xtype'toolbar',
    dock'bottom',
    items: [{
           
    text'More',
           
    id'productAssistantMore'
    }, {
            
    text'Less',
            
    id'productAssistantLess'
    }] 
    what technic/style do you use to get a reference to an item?
    Do you know an Ext native method to do something like toolbar.getItemById('productAssistantMore')?

    Thank you in advance. Just now I'm looping trough the items collection but... i don't like that

    Bye bye

  2. Code:
    toolbar.child('#productAssistantMore');
    or
    Code:
    toolbar.down('#productAssistantMore');

  3. #2
    Ext JS Premium Member twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    223
    Answers
    15
    Vote Rating
    3
    twaindev is on a distinguished road

      0  

    Default


    Code:
    toolbar.child('#productAssistantMore');
    or
    Code:
    toolbar.down('#productAssistantMore');

Thread Participants: 1