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
    827
    Vote Rating
    55
    Answers
    84
    jerome76 has a spectacular aura about jerome76 has a spectacular aura about jerome76 has a spectacular aura about

      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.

Tags for this Thread