on 11-04-2009 12:50 AM
Hello Experts,
I was wondering, is there a way of notifying the end user of a web dynpro application of unsaved changes if they attempt to navigate to a different role, or workset or page? I currently implemented a popup in the wdDoExit() of the view controller, and also tried the same in component controller, but it doesnt seem to work.
Any guidance is appreciated.
Regards
MM
PS. Using version 7.0.19_patch 1 of NWDS
Portal Ep7.0 SPS 19
Hi Marshall,
You can use Work protect mode offered by SAP for this purpose. It will open a popup automatically if you try to close the window or it will open a new page if you try to navigate to a new role or workset.
Also rather than having your own popup this will have only couple of lines of code and this will reduce the programming effort.
Regards,
Ponraj M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Well, in here the code was already developed when I joined. Basically, we keep one version of the data in it's original state, and another version which the user can modify while working. Whenever he tries to navigate away, we compare both data to see if any attribute value has been changed. We use a confirmation dialog to save or discard the changes.
In order to have the wdDoExit being executed when you navigate away from the View, you need to change the view lifecycle to "when_visible". Correct me if I'm wrong.
Hope it helps,
Daniel
Hi
I have one clue : Say when we make any field mandatory we can listen its state whether it filled or not ,before navigating to other view if we maintaine one boolean flag which tells us that any attempt is made to create something but before saving they trying to left the page based on this true /false value we popup a message saying about datalost or some information.
Now question is where we popup message : in save event only why (not in wddoexist()) : in this way we can maintaine three state
1. Saved : Created something and saved .
2.Unsaved : It activate when ever user press Create buton and try to move without saving.
3.partially filled : User press create event fill some data but not intended to save.
Infirst line I mentioned about field mandatory its optional but if we use then we have better control and in future its adaptable if required.
This is the case for view navigation .Plz Explain case for role and workset .
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
I'm not navigating between views within the application.
My issue is, while the user is working on some web dynpro app, and he accidently (or purposefully) navigates away from the application, say by clicking another tab (role) in the portal, how can we ensure he doesn't lose his work? Can we display a popup? For this i want to use the wdDoExit() method, but it doesn't allow me to perform any UI programming inside it, ie popup message box. I did notice that I can save the changes but without informing the user and also i dont want to save changes the user doesnt want to save!
MM
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.