Results 1 to 3 of 3

Thread: ComboBox multiple listeners

  1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    2
    Vote Rating
    0
      0  

    Default 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
    574
    Answers
    59
    Vote Rating
    74
      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
      0  

    Default It Works

    Thnx a lot ettavolt it works perfectly.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •