on 03-10-2008 3:23 PM
I have a component which I want to re-use in applications. The component should have 2 outbound (interface) plugs which can be wired into parent applications. When the user clicks buttonA in the component it should fire outboundPlugA, likewise for buttonB we have outboundPlugB. My problem is that I can only seem to fire outbound plugs of the view and not of the window.
Until now, we've solved this by firing interface events of the component controllers but it seems plugs would be more elegant.
How does one fire outbound plugs of the window?
Hi,
If you want to fire a window plug from a view , just write the code in event handler.
Data:l_ref_test TYPE REF TO ig_<window name>.
*Create reference for of itself
l_ref_test = wd_this->get__<window name>_ctr( ).
*Call the exit plug of the window
l_ref_test->fire_<plug name>_plg( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I've done what you said and have the following in the event handler (action of a button) in my view:
DATA:l_ref_test TYPE REF TO ig_comp1_window.
l_ref_test = wd_this->get_comp1_window_CTR( ).
The compiler error message is:
Method "GET_COMP1_WINDOW_CTR" is unknown or PROTECTED or PRIVATE.
This method does not exist as far as I can see.
Hi,
As far as I am aware, you cannot directly fire an outbound plug of a window from a view. What you can do however is, define an inbound plug for the window. Create a navigation link between the outbound plug of the view and inbound plug of the window. Fire the outbound plug of the view. This will invoke the event handler of the inbound plug of the window. In the event handler method of the inbound plug of the view, fire the outbound plug of the window. This is a round-about way, but it should work.
Regards
Wenonah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Koen: Thanks for the link. It does not seem to answer my specific question though: "How does one fire outbound plugs of the window?".
I now have implemented Wenonah's method where you fire a view's outbound plug which is wired to an inbound window plug wired to an outbound (interface) window plug . Is this correct or "orthodox" or is it more of a hack?
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.