cancel
Showing results for 
Search instead for 
Did you mean: 

WDDOEXIT ignoring POPUP window?

wolfgang_haerle
Explorer
0 Kudos

Hi experts,

I am trying to display a popup window during wddoexit (of the component controller) to ask the user if they want to leave the application. I am using

if_window_manager->create_popup_to_confirm() and lo_window->open( ) to do so but the open command is being ignored and the app is ending without displaying the popup window. Not sure if I am missing anything or if it is just too late to this in wddoexit?

Any advise?

Thanks,

Wolfgang

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184578
Active Contributor
0 Kudos

Hi,

I am trying to display a popup window during wddoexit (of the component controller) to ask the user if they want to leave the application. 

You cannot do that to stop the application from closing/navigating. By the time the WDDOEXIT fires, it's too late to trigger any events that stops closing the browser.

The possible way is, If you are using your WDA application in portal, use portal work protect mode. If you are using it as stand alone, Use FPM and implement the IF_FPM_WORK_PROTECTION to use work protect mode.

hope this helps u,

Regards,

Kiran

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

I tried the following in the same method of window and it is working fine for me. But in my example, I tried inside another window which is getting called from Handle default event from Main window.

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

  DATA lo_api_component  TYPE REF TO if_wd_component.

  DATA lo_window         TYPE REF TO if_wd_window.



  DATA lt_text TYPE string_table.

  DATA ls_text LIKE LINE OF lt_text.

  ls_text = 'test'.

  APPEND ls_text TO lt_text.

  lo_api_component           = wd_comp_controller->wd_get_api( ).

  lo_window_manager          = lo_api_component->get_window_manager( ).



  lo_window =  lo_window_manager->create_popup_to_confirm(

      text                 = lt_text

      button_kind          = 1 ).





  lo_window->open( ).