1. #1
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    193
    Vote Rating
    24
    elgs will become famous soon enough

      0  

    Default suspend change event on form load

    suspend change event on form load


    I want to suspend change events for all my form fields while the form is loading data. I learned a way from the following URL, and it works well.
    http://extjs-tutorials.blogspot.com/...le-events.html
    Code:
    var basic = form.getForm();
    basic.getFields().each(function(item, index, length){
      item.suspendCheckChange++;
    });
    basic.loadRecord(myRecord);
    basic.getFields().each(function(item, index, length){
      item.suspendCheckChange--;
    });
    However, I read from the documentations that suspendCheckChange is private. That means if I use this code, my code could be broken in the future extjs releases, though not necessary. So I was looking for some functions like suspendEvents and resumeEvents on the form fields. Unfortunately, I didn't find them on the form fields, and they are available on the form panel.

    So the question now becomes whether it is possible to suspend and resume events on the form fields?

    Thanks,
    Elgs

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,115
    Vote Rating
    507
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Ext.Component mixes in Observable, form.field.Base extends Component, so you can use suspend/resume.

    It's there in the docs:

    http://docs.sencha.com/extjs/4.2.1/#...d-resumeEvents
    http://docs.sencha.com/extjs/4.2.1/#...-suspendEvents
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    193
    Vote Rating
    24
    elgs will become famous soon enough

      0  

    Default


    Thanks Evan for the helpful information and the links.

    Best regards,
    Elgs

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar