cancel
Showing results for 
Search instead for 
Did you mean: 

Exit popup message

Former Member
0 Kudos

Hello,

For a java WebDynpro application I developed I would like to trigger a popup when the user leaves the application with a "Do you want to save changes" message and yes/no buttons.

Does anyone know whether this is possible and how to implement this?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member188556
Active Contributor
0 Kudos

Hi Johan,

I think its very much possible.

U want to pop up a window on an action rt?

Its possible.

Just create a window and put an iview inside it.

if dis, is perfectly ok i will give u more details

Regards

Bobu

Former Member
0 Kudos

Satyajit and Maksim,

Thanks for your answers, but both don't seem to solve my problem.

wdDoExit() seems to be called only on the component controller when I navigate away from the application. In this case I don't have a view to generate a popup anymore.

The application will be used either standalone or (most probably) in an external facing portal, in which case workprotect mode does not work (according to note 877188 on efp).

Is there some other way to achieve this? Is there a way to do something with javascript directly on the client side?

Former Member
0 Kudos

Hi Johan,

For that you should have a specific out-going point for application exit, say a log off button or something like that. Keep a boolean context variable in the view/controller, whenever you go to some view chnage that variable to true. When user tries to log-off then you can check the value of the variable, if it is tru then you can show that popup with save warning. For how to create pop-ups and dialog boxes refer to following tutorial,

http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/dialog boxes in web dynpro applications.pdf

I hope this helps you.

Regards,

Guru.

Former Member
0 Kudos

Well, I already have a "save" button in my application.

However I would like to trigger a popup when a user misses the button and just navigates away from the page (or closes the browser).

My guess would be that these users will miss the "logoff" button the same way as the "Save" button.

More ideas, anyone?

Former Member
0 Kudos

Hi Johan,

I don't think that is possible because the whole window is controled by the CSF(Client Side Framework) and i don't think there is any way you can do the things that CSF does with the Web dynpro application from the application itself.

However you can consider my previous option and start doing similar validations.

Best regards,

Guru.

PS : Award points for good replies.

former_member182372
Active Contributor
0 Kudos

Hi Johan,

Don`t think it is possible in "pure" WD application but if your WD application is integrated to portal then you can use <a href="http://help.sap.com/saphelp_nw04/helpdata/en/88/585d420447e054e10000000a155106/frameset.htm">Work Protect Mode</a>

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi,

I think you can put your pop-up in the wdDoExit() method.

Regards,

Satyajit.

Former Member
0 Kudos

<i>I think you can put your pop-up in the wdDoExit() method.</i>

Don't do it this way. This method called rigth before component is about to be destroyed, any "user interactions" i.e. actions that expect sending response (plug navigation or opening modal windows) will not work.

VS