1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    besim88 is on a distinguished road

      0  

    Default Answered: ComboBox multiple listeners

    Answered: ComboBox multiple listeners


    Hello,

    I would like to know if there is a way to have two listeners for one component, like in my case one combobox. So it could check any change of combobox and where a value would be selected.
    example would be like this :

    init: function() {
    this.control({
    'plan-list #cmbEmployeeSearch': {
    select: this.ComboEmployeeSearchSelect
    },
    'plan-list #cmbEmployeeSearch': {
    change: this.ComboEmployeeSearchChange
    }
    });
    }

    in this case it listens only the 'change' event not 'select'.

    Thank You

  2. Of course, just merge this two objects:
    Code:
    init: function() {
            this.control({
                'plan-list #cmbEmployeeSearch': {
                    select: this.ComboEmployeeSearchSelect,
                    change: this.ComboEmployeeSearchChange
                }
            });
        }

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    573
    Vote Rating
    74
    Answers
    58
    ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice ettavolt is just really nice

      0  

    Default


    Of course, just merge this two objects:
    Code:
    init: function() {
            this.control({
                'plan-list #cmbEmployeeSearch': {
                    select: this.ComboEmployeeSearchSelect,
                    change: this.ComboEmployeeSearchChange
                }
            });
        }

  4. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
    besim88 is on a distinguished road

      0  

    Default It Works

    It Works


    Thnx a lot ettavolt it works perfectly.

Thread Participants: 1

Tags for this Thread