on 02-23-2012 6:49 PM
Hi All,
I have a parent window (A) and there is a button on click of that i am opening a another window as external window(B). Now on window B there is a button CLOSE and on that i want to close that external window. How can i achieve this?? i tried it using exit plug but i m not able to get the currently open windows URL.
Thanks In Advance.
Hi,
you use this thread this will clear your doubts its of same scenario
[http://forums.sdn.sap.com/thread.jspa?threadID=1434757]
http://forums.sdn.sap.com/message.jspa?messageID=9006554#9006554
Thanks and Regards,
Dhaya.G.
Edited by: Dhayalinie Ganesh on Feb 24, 2012 12:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Dhayalinie Ganesh,
Thanx for your quick reply but i have refer the 2 link that you have provided i have also implement it using the exit plug. but the issue is when this event triggers then a windows popup comes for confirmation something like "You are about to leave the secure page" if i click on yes it works fine but if i click on no then the browse window becames white.
Thanks in Advance.
Hi,
You can refer this forum which will help you,
http://forums.sdn.sap.com/message.jspa?messageID=9006554#9006554
Thanks and Regards,
Dhaya.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you write this code for closing the secondarty window on click of button
<window object>.destoyInstance();
Thanks and regards,
Dhaya.G.
Edited by: Dhayalinie Ganesh on Feb 24, 2012 11:41 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check:
http://forums.sdn.sap.com/thread.jspa?threadID=1665958
*-SORRY- this link pertains to WD Java..but, you can have a look to get an idea
Edited by: Ajoy Chakraborty on Feb 24, 2012 4:43 PM
Hi,
As source window and External window are running on two different sessions.You cannot close the external window from your source window.As they lost their communication.
Thanks and regards,
Dhaya.G.
Edited by: Dhayalinie Ganesh on Feb 24, 2012 10:53 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prathamesh,
I am not clear about your requirement - are you trying to use URL through EXTERNAL WINDOW or you are trying to use WNDOW EXIT?
If its URL through External Window: following code might help--
METHOD onactiongo.
**-Created two radio buttons- SAP and Google. Select a radio button and click on GO button. Will redirect to the required URL
DATA lo_nd_select_option TYPE REF TO if_wd_context_node.
DATA lo_el_select_option TYPE REF TO if_wd_context_element.
DATA ls_select_option TYPE wd_this->element_select_option.
DATA lv_link TYPE wd_this->element_select_option-link.
* navigate from <CONTEXT> to <SELECT_OPTION> via lead selection
lo_nd_select_option = wd_context->get_child_node( name = wd_this->wdctx_select_option ).
* get element via lead selection
lo_el_select_option = lo_nd_select_option->get_element( ).
* @TODO handle not set lead selection
IF lo_el_select_option IS INITIAL.
ENDIF.
* get single attribute
lo_el_select_option->get_attribute(
EXPORTING
name = `LINK`
IMPORTING
value = lv_link ).
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.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CASE lv_link.
WHEN 'SAP'.
lo_window = lo_window_manager->create_external_window(
'http://sdn.sap.com').
lo_window->open( ).
WHEN 'GOOGLE'.
lo_window = lo_window_manager->create_external_window( 'http://www.google.com' ).
lo_window->open( ).
ENDCASE.
ENDMETHOD.
If its WINDOW EXIT:
1) Create EXIT button in VIEW.
2) Go to WINDOWS -> Outbound Plug -> Give Plug Name (e.g: OUT_EXIT) -> Check INTERFACE -> Plug Type = EXIT.
In same window, in "IMPORTING PARAMETER FROM OUT_EXT" -> Parameter = URL -> Associated Type = String
3) Go to VIEW -> Properties -> Create Controller Usaged
4) In "onAction event" of EXIT button, write the following code:
DATA lo_window1 TYPE REF TO ig_window1 .
lo_window1 = wd_this->get_window1_ctr( ).
lo_window1->fire_out_exit_plg( url = 'http://www.google.co.in' )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ajoy,
DATA lo_window1 TYPE REF TO ig_window1 .
lo_window1 = wd_this->get_window1_ctr( ).
lo_window1->fire_out_exit_plg( url = 'http://www.google.co.in' )
i m using the same code but my problem is that my URL is dynamic, so that i cant hardcode the URL.
I want to know how can i get the URL of currently browsed window.
Thanks In Advance
Hi,
is it a popup?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.