Close popup window
IF_WD_WINDOW =>CO_BUTTONS_ABORTRETRYIGNORE The possible values for this parameter are as follows. Parameter BUTTON_KIND of method CREATE_POPUP_TO_CONFIRM enables you to specify a set of buttons for the confirmation popup window. 2.3 Implement Event Handler POPUP_TO_CONFIRM WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_ok.ĮNDMETHOD. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_close. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_ignore. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_retry. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_cancel. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_abort. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_no. WHEN if_wd_popup_to_confirm_n=>co_popup_button_event-on_yes. * Handle the button click event as needed
CLOSE POPUP WINDOW UPDATE
An event handler might be used, for example, to update the context according to the user’s response in the confirmation popup window.
In view V_MAIN, create an event handler method POPUP_TO_CONFIRM_EVENT_HANDLER and implement it as follows.
This step is only needed if you want to subscribe to button click events in the confirmation popup window. Repeat steps 1.1 Create a Web Dynpro Component and 1.2 Create a Window Attribute of section CREATE_EXTERNAL_WINDOW to create a new Web Dynpro component and window attribute, or skip these steps and extend the component created in section CREATE_EXTERNAL_WINDOW.Ģ.2 Implement an Event Handler Method for Button Click Events Procedure 2.1 Create a LinkToAction with Event Handler With this method, there is no need to specify an interface view to contain the text message the interface view is provided by the runtime. This method creates a modal dialog window for displaying a simple text message with optional icon. Clicking the link CREATE_EXTERNAL_WINDOW opens a new browser window showing the specified web address.
Save, activate and run the Web Dynpro application. Wd_comp_controller->window = lo_window_manager->create_external_window( Lo_window_manager = lo_api_component->get_window_manager( ). Lo_api_component = wd_comp_controller->wd_get_api( ). METHOD onactionpopup_extern_window.ĭATA lo_api_component TYPE REF TO if_wd_component.ĭATA lo_window_manager TYPE REF TO if_wd_window_manager. Implement the event handler method for the LinkToAction element as follows. Properties (LinkToAction)ġ.4 Implement Event Handler POPUP_EXTERN_WINDOW In the layout of view V_MAIN, create a LinkToAction element with the following properties. Having a reference available as a public attribute enables us to access and control the popup window from any view.ġ.3 Create a LinkToAction with Event Handler In the component controller, create a public attribute WINDOW to store a reference to the popup window object. Also create an application for the component. Procedure 1.1 Create a Web Dynpro ComponentĬreate a Web Dynpro component, ZDEMO_POPUPS with a view, V_MAIN and window, W_MAIN. It may be used to open a secondary browser window containing a different web application or an internet website. This method creates an independent, external browser window with URL address. Each method is discussed below and an example is given of its implementation.Ĭreates an independent, external browser window with URL address.Ĭreates a modal dialog window for displaying a simple text message with optional icon.Ĭreates a modal dialog window for displaying an interface view of the current component.Ĭreates a modal dialog window for displaying an interface view of a component usage. These methods may be used to open a modal dialog window with simple text or content from a Web Dynpro view or open an independent browser window with a URL address. Interface IF_WD_WINDOW_MANAGER provides four methods for creating a secondary window in a Web Dynpro ABAP component.