1. #1
    Sencha User halogen's Avatar
    Join Date
    Jun 2012
    Posts
    11
    Vote Rating
    0
    halogen is on a distinguished road

      0  

    Default Answered: Access event data in Controller's listener

    Answered: Access event data in Controller's listener


    How do I access event data when using a Controller to respond to events? Example:

    Code:
    Ext.define('fooapp.controller.Main', {
        extend: 'Ext.app.Controller',
    
        config: {
            control: {'#bar-list': {select: 'selectBarItem'}}
        },
    
        selectBarItem: function() {
            // Do something based on which barItem was selected in bar-list
        }
    });

  2. It should pass the same parameters over into your custom function. So whatever parameters are passed in the 'select' event, you should be able to use those in your selectBarItem function.

  3. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      1  

    Default


    It should pass the same parameters over into your custom function. So whatever parameters are passed in the 'select' event, you should be able to use those in your selectBarItem function.

Thread Participants: 1

Tags for this Thread