I have a GWT
website that displays some data onto the client in a tabular form. Some of the fields are editable, when any change is made the save button becomes active.
There are multiple properties that may have changed, how would I go about updating them on the server? Additionally I'd like to provide an undo button so that the changes are reverted.
What I'm thinking of right now is to use the setters and check if the current value is the same as the changed value if there is a change then a request to a process in the background will be fired.
But I'm not sure this is the best approach and maybe setters with extra logic aren't the best practice. I think this is a problem that many web applications have to deal with and maybe there is a pattern that makes all of this more elegant.
It would be nice if someone could explain how they would solve this.