cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a pop up on the close of webdynpro application.

Former Member
0 Kudos

Hi All,

I want a pop up on the close of the webdynpro application....i tried coding in the doexit method and doOnClose method of the window but the pop up does not open...Can anyone guide me on this.

Thanks and Regards,

Srividya

Former Member
0 Kudos

Did u create second window in your application.Place your second view on second window then call your second window from the CREATE_WINDOW Method.

Check this standard example it will clarify your doubt.

WDR_TEST_POPUPS_RT_00 in this they have created seperate windows for pop ups.

check this method.

method onactionpopup1_1 .

  data: l_cmp_api           type ref to if_wd_component,
        l_window_manager    type ref to if_wd_window_manager.

  l_cmp_api           = wd_comp_controller->wd_get_api( ).
  l_window_manager    = l_cmp_api->get_window_manager( ).
  if wd_this->m_popup1_1 is initial.
    wd_this->m_popup1_1 = l_window_manager->create_window(
             window_name  = 'POPUP1_1'
             button_kind  = if_wd_window=>co_buttons_yesnocancel
             message_type = if_wd_window=>co_msg_type_question ).
  endif.
  wd_this->m_popup1_1->open( ).

endmethod.

Former Member
0 Kudos

Did u create second window in your application.Place your second view on second window then call your second window from the CREATE_WINDOW Method.

Check this standard example it will clarify your doubt.

WDR_TEST_POPUPS_RT_00 in this they have created seperate windows for pop ups.

check this method.

method onactionpopup1_1 .

data: l_cmp_api type ref to if_wd_component,

l_window_manager type ref to if_wd_window_manager.

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

if wd_this->m_popup1_1 is initial.

wd_this->m_popup1_1 = l_window_manager->create_window(

window_name = 'POPUP1_1'

button_kind = if_wd_window=>co_buttons_yesnocancel

message_type = if_wd_window=>co_msg_type_question ).

endif.

wd_this->m_popup1_1->open( ).

endmethod.

thanks

Suman

Former Member
0 Kudos

Did u create second window in your application.Place your second view on second window then call your second window from the CREATE_WINDOW Method.

Check this standard example it will clarify your doubt.

WDR_TEST_POPUPS_RT_00 in this they have created seperate windows for pop ups.

check this method.

method onactionpopup1_1 .
 
  data: l_cmp_api           type ref to if_wd_component,
        l_window_manager    type ref to if_wd_window_manager.
 
  l_cmp_api           = wd_comp_controller->wd_get_api( ).
  l_window_manager    = l_cmp_api->get_window_manager( ).
  if wd_this->m_popup1_1 is initial.
    wd_this->m_popup1_1 = l_window_manager->create_window(
             window_name  = 'POPUP1_1'
             button_kind  = if_wd_window=>co_buttons_yesnocancel
             message_type = if_wd_window=>co_msg_type_question ).
  endif.
  wd_this->m_popup1_1->open( ).
 
endmethod.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try writing code on wddoexit of componentcontroller.

Former Member
0 Kudos

HI,

i tried writing the code in the DOEXIT method as well as WDDOAPPLICATIONSTATECHANGE of the component controller.But i cant see any pop up..the code wat i have written is :

data: window_manager type ref to if_wd_window_manager,

cmp_api type ref to if_wd_component,

window type ref to if_wd_window,

lt_texts type string_table,

wd_comp_controller type ref to IG_COMPONENTCONTROLLER.

append `Testpopup` to lt_texts.

cmp_api = wd_comp_controller->wd_get_api( ).

window_manager = cmp_api->get_window_manager( ).

window = window_manager->create_popup_to_confirm(

text = lt_texts

button_kind = if_wd_window=>co_buttons_ok

message_type = if_wd_window=>co_msg_type_none ).

window->open( ).

This code is working for event handlers.I have checked it.

former_member189058
Active Contributor
0 Kudos

Hi Srividya,

Try this blog: [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6687] [original link is broken] [original link is broken] [original link is broken];

This will show a popup window asking user if he/she wants to exit and close the browser.

Hope this helps.

Regards,

Reema.

Former Member
0 Kudos

hi srividya.......

write it in the wddoexit of the view and not the window...

--regards,

alex b justin

Former Member
0 Kudos

Hi Alex,

I tried adding tat code in the doexit method of the view also.But it is not popping up.

Thanks,

Srividya.

Former Member
0 Kudos

hi srividya......

the thing is.......

it goes into the code but the popup does not comes up because the browser gets closed before that... but you will be able to see the message, browser started. these methods can be used only for clearing values.

better have a seperate button and use a popup and then close the browser.

---regards,

alex b justin