Results 1 to 4 of 4

Thread: How to suspend change event of combobox in Ext Js 4.1.3?

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Gujarat,India
    Posts
    59
    Answers
    1
    Vote Rating
    0
      0  

    Default Unanswered: How to suspend change event of combobox in Ext Js 4.1.3?

    I bind change event of combobox in controller it's work but now I want to set some default value but I don't want to fire change event on this default value set.so I use combobox.suspendEvents() and combobox.resumeEvents() but it's not working..

    I add some code below

    PHP Code:
    combo.removeListener'change' );
    combo.setValue(oldValue);
    combo.addListener'change' ); 
    Any suggestion for this?

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      0  

    Default

    Are you using MVC approach? EventBus doesn't take in account suspending on target so you need to check it manually.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Location
    Gujarat,India
    Posts
    59
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Yes I am using MVC..I can't do it in view.Any alternate way to do this?

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      0  

    Default

    In your listener you could check suspend status yourself. Like:
    Code:
    onComboChange:function(combo, newVal, oldVal) {
        if(!combo.eventsSuspended) {
            //Do what you want to do...

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
  •