Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 2136

How to implement "Confirm data lost" message while in editing mode?

$
0
0

Hi,

 

refering to this best practice for editing / creating objects in Fiori style my question is how to implement this "Confirm all data will be lost when you leave this page without saving" message prompt.

 

I have a split app and these actions must trigger the confirmation prompt while in edit mode:

 

1. User clicks a link on the create / edit page which would lead to a hash change / navigation to another object page

2. User clicks another item in the master view while in edit mode on the details view

3. User changes the hash by opening a bookmarked deep link with the browser

 

One strategy could be to set a flag on the router when a page goes into edit mode.

In case the flag is true the router then would have to intercept all navigation actions with the confirmation prompt and continue only if the user confirms that all data entered on the edit page will be lost.

 

One approach could be to override the navTo method of my derived router and check for edit mode before calling the super class implementation.

This would work for the first two scenarios but not for the third one.

 

How would you implement this, or do you have another approach?

Would you possibly don't care about the third scenario because this would be triggered from "outside" of the application?

 

BTW: How can I check out the source code of SAP Fiori apps? Are they publicly available somewhere or do I have to install them on our SAP system first? Maybe some common questions could be clarified by analyzing some SAP sources.


Viewing all articles
Browse latest Browse all 2136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>