Hello,
I have seen questions similar to this one asked several times before in this forum, but still can't figure out a elegant solution to it. So the idea is simple: when user tries to navigate away from a dirty page (which contains user modifications not persisted to DB), prompt the user.
The term dirty in our definition is by model, i.e., a page is dirty iff its model is dirty. So, even user interacts with the page, but as long as the page model ends up being the same as before, the page is not dirty.
So what is the best way to check if a page's model has changed since last load/save?
Thanks!