| JavaScript Document (8) Events (8) ExtJS (9) Strings (3) |
Handling dirty (modified) text input fields in ExtJS
Question: I am working with ExtJS - how can I detect if a field has been modified in a dynamic form? I have a master table and a detail panel where I show details for the selected record in the master table.Answer: You can check if the entire panel or individual fields are empty by querying the isDirty() function.But when the changes have been saved, you may want to reset this flag. I found that there is some method clearDirty() and a related flag trackResetOnLoad but I could not make it work. After some experimenting, I wrote my own resetDirty() function - see below. I call it after modified text values have been saved back to the database.
Comments:
| |||||||||||||||||||||||