Search This Blog

Tuesday, October 6, 2015

Confirm unsaved changes to avoid losing data when navigating to another web page - YOUR FEEDBACK IS NEEDED

Scenario

Imagine you are in an XAF ASP.NET app context and just edited a record in the DetailView or ListView directly (e.g., linked or unlinked related details, typed something in the text box, changed drop downs, etc.) and then accidentally clicked a navigation item or some other link within the app...If the Save Action was not explicitly executed before that accidental action took place, there is a risk of losing your recent edits...and sadly this sometimes happens. Thankfully, this is not the case for the WinForms platform, where it is already handled.

Current solutions

There are some custom-tailored solutions available in the Support Center (onetwo), but they far from being ideal, to be honest.

Good news

As part of our continuous effort to improve the XAF Web UI (be sure to check it), the new v15.2 (should be out around December, as always) will contain a built-in solution for the aforementioned problem. 

More good news

To help you test it today (not for production use), we are showing a preview of the new functionality in v15.1.8+. To test it live today, do the following:
0. Make you have v15.1.8+ installed (or download and install this hot fix build from October 2nd or later if this link expires);
1. Invoke the Model Editor for YourSolution.Web project;
2. Navigate to the Options node and set its ConfirmUnsavedChanges property to True.



IMPORTANT NOTES

0. We would greatly appreciate it if you could test this with your real projects and report any uncovered scenarios where this option was insufficient to us via the Support Center. Thanks in advance!
1. Please do not look for how it is implemented internally for now, just test the end result from the global ConfirmUnsavedChanges property in your apps, because there internals (e.g., names) are to be changed by the final release in v15.2.
2. There are additional options for a more granular control at the IModelActionWeb and even  IModelMemberViewItemWeb levels in the Application Model.

3 comments:

  1. Now that's what I call good news!!! It will make my solutions look much more professional. I'll definitely check this feature on a recent customer project and provide feedback as soon as 15.1.8 is out.
    Thank you!

    ReplyDelete
  2. Basically the same comment as Andreas. Good work guys

    ReplyDelete