on 07-17-2012 8:48 AM
Hi Gurus,
I want to fire an outbound plug of a View from Component controller's method.
This is the scenario.
This is the code written to register event handler in Component controller's WDDOINIT.
DATA: l_api TYPE REF TO if_wd_component.
l_api = wd_this->wd_get_api( ).
l_api->add_event_handler(
listener_name = 'COMPONENTCONTROLLER'
handler_name = 'OK_HANDLE'
controller_name = 'COMPONENTCONTROLLER'
event_name = 'OK_CLICKED' ).
Can you suggest how do i fire an outbound plug of View_A from Component Controller's method?
Regards,
Ashish Shah
Hi,
Make the event Public.
Now instead of handling the event in Component Controller, create the event handler in View 1. i.e. OK_HANDLE should be in View 1.
Now in this event handler call outbound plug.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Khushboo,
I had tried the same thing earlier, it did not work for me then.
However as soon as i added this code in VIEW A's WDDOINIT it worked now.
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
DATA lo_api_componentcontroller TYPE REF TO if_wd_component.
lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ).
lo_api_componentcontroller->add_event_handler(
listener_name = 'V_MAIN'
handler_name = 'OK_HANDLE'
controller_name = 'COMPONENTCONTROLLER'
event_name = 'OK_CLICKED' ).
Thanks for your help.
Regards,
Ashish Shah
Hi Ashish,
I think you're trying to do it too complicated. If you want to call the view B from the popup called in view A you can do it directly from the action SUBSCRIBE_OK of view A.
Why do you want to do it from component controller?
Anyway if you want to fire an outbound plug from the component controller you can create this outbound plug in your window, add the window as used controller (Properties tab) in your component controller and you'll can fire the plug using the code wizard "Method call in used Controller".
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricardo,
The only reason , i am using this complicated scenario , is since the pop up window is not a confirmation Pop-Up window , its a window containing a custom view.
Also in this custom view , i have a OK button inside my View, its not a OK button of a Pop Up window.
Thanks for your suggestion about window's plug, i was not aware that i can add Window controller as a used controller in Component controller.
Regards,
Ashish Shah
User | Count |
---|---|
88 | |
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.