1. #1
    Sencha User
    Join Date
    Mar 2011
    Location
    Gujarat,India
    Posts
    57
    Vote Rating
    0
    Answers
    1
    nareh tank is on a distinguished road

      0  

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

    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
    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


    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
    57
    Vote Rating
    0
    Answers
    1
    nareh tank is on a distinguished road

      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
    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


    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...

Thread Participants: 1

Tags for this Thread