Results 1 to 7 of 7

Thread: How to detect user-changes in FormPanel

  1. #1
    Sencha User
    Join Date
    Aug 2009
    Location
    Tamworth, NSW, Australia
    Posts
    32

    Question How to detect user-changes in FormPanel

    Is there a way to easily detect if the user has changed any values in a FormPanel? I've tried searching to see if there's such a thing, but even the API docs lead me to believe I have to write methods to check each field one by one.

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    So you are looking for:
    Code:
    formPanel.getForm().isDirty()

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    Or, if it needs to be dynamic and reactive, you could request that form Fields bubble their change events, and listen for change events at the FormPanel level.

  4. #4
    Sencha User
    Join Date
    Aug 2009
    Location
    Tamworth, NSW, Australia
    Posts
    32

    Smile

    Quote Originally Posted by Condor View Post
    So you are looking for:
    Code:
    formPanel.getForm().isDirty()
    Thanks. That does look exactly like what I want. Would you recommend any good books for learning Ext JS? I'm finding the raw API documentation just a little overwhelming. It's hard to figure out exactly what goes with what, and it'd be good to read an excellent book on it all.

    I've found "Practical Ext JS Projects with Gears" to be a bit disappointing, not only because I'm running 64-bit Linux, and therefore can't use Gears, but also because the book glosses over each of the widgets and doesn't give enough of an understanding on how each one works. Instead, it focuses on several whole project ideas and has absolutely no Ajax stuff in it. A bad choice, in hindsight.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    The "Hide inherited members" button helps a lot when looking for class-specific config options which might help.

  6. #6
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Quote Originally Posted by mfearby View Post
    Would you recommend any good books for learning Ext JS? I'm finding the raw API documentation just a little overwhelming.
    There is Learning Ext JS, which is a good introduction, but doesn't have a lot of detail. I would recommend Ext JS in Action (it's not finished yet, but you can read the finished chapters with early access).

  7. #7
    Sencha User
    Join Date
    Aug 2009
    Location
    Tamworth, NSW, Australia
    Posts
    32

    Talking

    Quote Originally Posted by Animal View Post
    The "Hide inherited members" button helps a lot when looking for class-specific config options which might help.
    Thanks. Didn't notice that little button up there until you pointed it out. That should make a huge difference.

    Quote Originally Posted by Condor View Post
    There is Learning Ext JS, which is a good introduction, but doesn't have a lot of detail. I would recommend Ext JS in Action (it's not finished yet, but you can read the finished chapters with early access).
    Thanks. Whilst your second recommendation should be a good buy next year when it's finally available, I've just bought an ebook of the first one because even something at its level will be invaluable to get me started.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •