Skip to Content

How to fire event in view controller from component controller.

I have a component usage that fires an event wich i have subscribed in the component controller.

iv_usage->subscribe_event( iv_event_name = 'TAKE_IT'

iv_handler = me ).

After the event the method IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT in the component controller is called.

method if_bsp_wd_event_handler~handle_event.

??????

endmethod.

The usage component is opened as a popup window. After pressing a button, the data is transfered via context node binding to the calling component. But now i want to close the popup.

My intension is to fire a event for the view controller in the IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT method that closes the popup.

Is this possible?

Or let me explain it this way:

I want to close a popup after a button in the popup is pressed.

best regards

Jürgen

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Oct 19, 2011 at 08:45 AM

    I solved it with plugs - this is the better way.

    But if someone has an idea - you are wellcome.

    br

    Jürgen

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Juergen

      I am assuming your target pop-up is of type ref to IF_BSP_WD_POPUP.

      1.Make this a view controller class attribute.

      2. After the code to create the pop-up, you can add the following block :

      gv_target_popup->set_on_close_event( iv_view = me iv_event_name = 'CLOSEPOPUP').

      3. Now define event handler EH_ONCLOSEPOPUP where you can write the logic for on_close.

      You can access the same reference gv_target_popup at the event handler level as well.

      Hope this helps.

      Regards

      Nisha

  • Posted on Dec 12, 2011 at 10:23 AM

    closed

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.