I am working on a system, since the user can edit existing objects (more precisely, "Filter" objects) through a graphical interface. As a hint to the user interface, we only want to enable the save button if the user has really changed something for the object. I was wondering if anyone has any experience with this problem and how best to approach this.
I was thinking about adding the isDirty () flag to a domain object. When the user starts editing the filter, I would then make a copy, transfer it to the graphical interface and give the user the opportunity to make changes to the copy. After that, binding to the isDirty () flag activates / deactivates the save button. When saving, the differences will then be merged into the original object and saved.
Additionally, I thought what would happen if the user discards the changes made by him to the object. The isDirty () flag should return false. Therefore, I assume that the only way to achieve this is to keep the original value of each property inside the domain object.
Any ideas?
user-interface dns flags
Christophe herreman
source share