This page is a first attempt of establishing a new documentation style for Phoenix
that is combining code samples, actually running Phoenix controls and explanations
for specific focus areas or controls.
The Phoenix Dialog control is used to temporarily display some limited-size user interface parts
in front of the "regular" application without modifying or entirely removing it.
In doing so it resembles concepts known from other UI technologies under a range of names: Dialog Box,
Dialog window, Popup, Popup Window, Alert Box, Message Box,...
The Phoenix Dialog is (currently) always modal, this means while it is opened, no user input can be directed to the regular UI.
From application programmer's perspective, the Dialog comes in two flavors:
You can create an instance of the regular Dialog like you do with any other control, using its constructor
new sap.ui.commons.Dialog(). Then you can set properties like the title or the Dialog content.
The Dialog has an aggregation for the buttons to be displayed at the bottom, so you can create one or more buttons and add them to the Dialog
using its .addButton(...) method.
When the Dialog is ready, you can make it appear calling its .open() method. This method immediately
returns the control flow, so your next instruction will be executed immediately, while the Dialog is still opened and the user has
not clicked any button.
The Dialog buttons are regular buttons where you can register for the press event and act accordingly.
If one of those buttons should close the dialog, the event handler just needs to call the Dialog's .close() method.
There is also another means of closing the Dialog: unless you set .showCloseButton(false), there will be the
X-like close button in the header of the Dialog, which always closes the dialog. You can react on this case using the
closed event, which will be invoked whenever the Dialog is closed.
(Reset Code)
(Reset Code)
(Reset Code)
(Reset Code)