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,785
    Vote Rating
    597
    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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."