Pages

Monday, May 5, 2014

Difference between "modified" and "dataChanged" form data methods on datasource fields

When overriding methods on a form data object, it is important to know what they do exactly!  Two methods in particular, formdataobject.modified() and formdataobject.dataChanged(), sound very similar but are different.


The important difference is that dataChanged() runs EVERY time the data is changed, while modified() only runs after successful validation!

This may seem like a "duh" post for some, but I was surprised at the number of people who couldn't tell me the difference.

So if a user changes data on a form, it may fail validation and modified() would never run.  This is often where you would prefer to hook your code since if the field doesn't truly change, you don't want anything triggered.

15 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Another difference is that dataChanged() event is invoked even when control value is not changed manually. I mean for example, when you init fieldValue in the process and the control value will change due to that init, dataChanged event is invoked, when modified event is only invoked when you manually change value.

    ReplyDelete
  3. Another difference is that dataChanged() event is invoked even when control value is not changed manually. I mean for example, when you init fieldValue in the process and the control value will change due to that init, dataChanged event is invoked, when modified event is only invoked when you manually change value.

    ReplyDelete
  4. Individual data must not be moved to nations outside the European pengeluaran hk

    ReplyDelete
  5. Pasarqq tempat Bermain judi bandarq online tentunya menjadi di antara pilihan yang tidak sedikit dipilih oleh pemain website bandarq .Bisa anda lihat profile terkait pasarqq ternama melalui metode klik link https://findery.com/pasarqq , lalu https://www.thebaynet.com/profile/noverakasanti888 kemudian https://fontlibrary.org/en/member/pasarqq/ dan juga http://www.myfolio.com/pasarqq.
    Selain itu juga pasarqq ini memiliki homepage personal seperti https://pasarqq.cabanova.com/
    http://rebuildingtogethernb.org/selamat-datang-di-situs-poker-online-pasarqq/
    http://sonidoslibertarios.org/selamat-datang-di-situs-poker-online-pasarqq/
    http://jonnymugwump.com/selamat-datang-di-situs-poker-online-pasarqq/

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. Good artcile, but it would be better if in future you can share more about this subject. Keep posting.
    유로파리그중계

    ReplyDelete
  8. It's a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Fantastic work!
    เกมส์คาสิโนยอดนิยม

    ReplyDelete
  9. Hallo Gan !!!
    Artikel Dan Konten Yang Sangat Menarik Dan Bagus Sekali
    Izin Untuk Comment Ya Gan. Terima Kasih ^_^

    PERMAINAN GAMES ONLINE YANG TERBESAR DI ASIA
    Aslijudi
    Situs Judi SLot
    Agen Judi Bola
    Casino Online
    Poker Online
    Prediksi Parlay
    NowGoal

    Kumpulan Situs Slot Online
    Daftar Agen Judi Online
    Link Alternatif Aslijudi

    ReplyDelete
  10. Zakłady sportowe w kasynie http://nastrychu.com.pl/ 22bet pl na portalu to najbardziej dochodowy rodzaj dochodu. Jak tylko dokonasz pierwszego zakładu, zdasz sobie sprawę, że znalazłeś dokładnie to, czego szukałeś. Więc nie bój się podejmować ryzyka. Kasyno ma najwyższy wskaźnik wypłat, a to już wskazuje, że możesz się wzbogacić i wcale nieźle. Bardzo łatwo jest postawić na port. Najważniejsze to wierzyć w swoją sportową intuicję, a wtedy cię nie zawiedzie.

    ReplyDelete
  11. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing
    파워볼사이트

    ReplyDelete
  12. great work for posting more another beneficial to other people. keep up doing the good work! agen poker online terpercaya

    ReplyDelete