on 09-27-2010 5:20 AM
Hello All,
I have a WD4A application. On one view(SECOND_VIEW) of a window(MAIN_WINDOW), there is a button. When the user clicks this button, a popup window displays.
Now what i want is that when the popup closes, the previous view(second_view) does some action.
So the question is how do i find out if the popup window has closed? I am able to close it, but how to inform the view that called it, that it is closed.
P.S. The popup view is in a different window.
HI Mithun,
I had a similar requirement for which i used cross component programming technique. I am using the SUBSCRIBE TO BUTTON EVENT in the WDDOINT method of popup window to register an event handler to it's OK button.
lo_window->subscribe_to_button_event(
button = if_wd_window=>co_button_OK
button_text = 'Select DOC NR.'
action_name = 'SELECT'
action_view = l_api
is_default_button = abap_true ).
I have created a method TRIGGER_EVENT_NAV in COMPONENTCONTROLLER .In my event handle in popup windowr (action 'SELECT' in my case) i am calling the previously mentioned compcontoller method (TRIGGER_EVENT_NAV) by using this statement WD_COMP_CONTROLLER->TRIGGER_EVENT_NAV( ).
Now create an event in your COMPONENTCONTROLLER ( eg. OP_SECOND_WDW - this acts as your outbound plug ) and create a corresponding inbound plug in SECOND WINDOW ( IN_SECOND_WDW ). register this inbound plug (IN_SECOND_WDW) to event of component controller (OP_SECOND_WDW ).
use this statement
wd_this->fire_OP_SECOND_WDW_evt
in the method TRIGGER_EVENT_NAV to trigger the event OP_SECOND_WDW from component controller. This event in turn triggerrs the inbound plug IN_SECOND_WDW of second window.
Further naviagtion within the window is the normal INBOUND - OUTBOUND plug navigation.
Let me know if you need any further input on this issue.
Thanks,
Vivek
Edited by: Vivek Priyadarshi on Sep 29, 2010 4:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
you can use the method SET_ON_CLOSE_ACTION() of IF_WD_WINDOW to set an handler for 'ONCLOSE' event.
In the handler write the logic to be executed when the window is closed.
Thanks,
aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.