Calling dialog boxes of same component
In this recipe, we will see how we can display a dialog box based on a view of the same component. We will create a MAIN
view in the MAIN
window and another view by the name POP_UP
in a new window, WIND_POP_UP
. We will then create a button on the MAIN
view, which when clicked will display the POP_UP
view as a dialog box.
How to do it...
We will now carry out the following steps:
We will define a public attribute by the name
MY_WINDOW
to theIF_WD_WINDOW
interface.We will have a main view embedded within the
MAIN
window.In addition, we will create a
POP_UP
view embedded within aWIND_POP_UP
window.On the
MAIN
view, we will create a button.On action button event handler method, we will write the appropriate code for calling the
POP_UP
view as a pop-up dialog box. We use theWD_GET_API
method of the component controller to get access to the relevant APIs. TheGET_WINDOW_MANAGER
function is then called in order to get reference to theIF_WD_WINDOW_MANAGER
...