cancel
Showing results for 
Search instead for 
Did you mean: 

Popup in method wddoexit?

Former Member
0 Kudos

Hi experts!

I need to show a popup after the user click on symbol 'X' of the browser. The popup advise that if the user don't save the informations, the same informations will be lost. Where I have to put the code? Can you give me an exemple of the code?

Thanks a lot.

Edited by: webdynpro.gc on Jan 12, 2011 10:44 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi webdynpro ,

if your application is run in portal then you can do set work protection mode as suggested by basker

When a Web Dynpro application is run in a portal it is necessary to set Work Protection mode to avoid any data loss by navigating away from the application. When the Work protection mode is set to dirty and the user tries to navigate away from the application the portal manager will display a window with three options prompting the user to choose one.

below is the code to set work protection mode .

DATA: lr_portal_mgr TYPE REF TO if_wd_portal_integration.
* get api
  lr_comp_api = wd_this->wd_get_api( ).
* get portal manager
  lr_portal_mgr =  lr_comp_api->get_portal_manager( ).
* set dirty
  lr_portal_mgr->set_application_dirty_flag( dirty_flag = abap_true ).

regards

chinnaiya P

Edited by: chinnaiya pandiyan on Jan 12, 2011 4:47 PM

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo,

by the way: you can apply the Work Protect Mode of Web Dynpro ABAP API IF_WD_PORTAL_INTEGRATION even outside SAP NetWeaver Portal in case your application is started in SAP NetWeaver Business Client or in SAP NWBC for HTML.

Regards, Bertram

gill367
Active Contributor
0 Kudos

it will go to wddoexit method on closing the browser but navigation cannot be stopped.

so as basakaran suggested you can try work protected mode.

Former Member
0 Kudos

Hi GC

Please go through these links u get some idea...

thanks,

kris.

Former Member
0 Kudos

Uhm, I don't think that this link can help me... I have to show a popup when the user press CLICK on the symbol 'X' of the browser and not click on a button...

Former Member
0 Kudos

Hi dynopro,

Experts told this is not possible in WD Framework..

Have you observe any popup like window is coming while closing any normal internet applications??? ...

To get more information.. pelase have a look

thanks,

kris.

Former Member
0 Kudos

Hi

As already suggested in this forum and links, Work protect mode is an option.

I am not sure if you are able to handle that in wddoexit showing a popup to leave yes or no? If you are there ,implies that you can close files, save or something like that but not stop the navigation .