6.6 Creating Dialog Pages
Oracle APEX includes support for modal and non-modal dialog pages. Modal and non-modal dialog pages are only supported if the current application theme contains at least one page template of template type Dialog Page.
- About Supported Dialogs
When you create a new page, the wizard prompts you to select a Page Mode. The Page Mode determines if the page is a normal application page or a dialog page. - Creating a Dialog Page Template
Create a dialog template if your theme does not include one and how to edit dialog template attributes to change the display. - Editing a Dialog Page in Page Designer
Change how a dialog page displays by editing attributes in Page Designer. - Generating a Cancel Dialog Dynamic Action on the Dialog Page
For dialog pages that contain a Cancel button, create a dynamic action that controls what happens when the button is clicked. - Generating a Close Dialog Page Process on the Dialog Page
Close a dialog page by creating a Close Dialog page process. - About Branching with Dialog Pages
Open dialog pages using buttons or links. - Handling Refresh Actions on Parent Page
Learn about handling refresh actions on parent pages.
Parent topic: Managing Pages in an Application
6.6.1 About Supported Dialogs
When you create a new page, the wizard prompts you to select a Page Mode. The Page Mode determines if the page is a normal application page or a dialog page.
Oracle APEX supports two types of dialog pages:
- Modal Dialog - A modal dialog is an overlay window positioned within the same browser window. A modal dialog remains active and focused until the user has finished with it and closes it. While a modal dialog is active, the user is unable to interact with the rest of the page until the dialog is closed.
- Non-modal Dialog - A non-modal dialog displays a separate popup browser window. A user can interact with a non-modal dialog and content on the page. Use a non-modal dialog when the requested information is not essential to continue. This type of window can be left open while work continues elsewhere.
Oracle APEX includes dialog page templates in the Universal Theme - 42. When you set the Page Mode to either Modal or Non-Modal, APEX automatically uses the default dialog page template.
You can further define the appearance and layout of a dialog by specifying the Dialog Template.
Parent topic: Creating Dialog Pages
6.6.2 Creating a Dialog Page Template
Create a dialog template if your theme does not include one and how to edit dialog template attributes to change the display.
The dialog page template contains JavaScript function calls that handle the initialization, closure, and cancellation of a dialog page. When you create a dialog page template, you must define these and other Dialog Page Templates attributes.
See Also:
If you are using an existing application and the theme does not contain a dialog page template, then you must create one. While you can create one from scratch, the easiest option is to copy an existing dialog template.
To create a dialog page template:
- Navigate to the Shared Components, Templates page:
- On the Workspace home page, click the App Builder icon.
- Select an application.
- Click Shared Components.
- Under User Interface, select Templates.
- Click Create.
- In the Create Template Wizard:.
- Template Type - Select Page and click Next.
- Creation Method - Select As a Copy of an Existing Template and click Next.
- Copy From - Select the application to copy from and click Next.
- Identify Theme - Select the theme you are copying from and the theme you are copying to and click Next.
- New Templates - Locate the Modal Dialog templates to copy (for example, Drawer, Modal Dialog, or Wizard Modal Dialog) and select Yes.
- Select Copy Page Templates.
- Verify the dialog page template is active in the current theme
See Also:
Parent topic: Creating Dialog Pages
6.6.3 Editing a Dialog Page in Page Designer
Change how a dialog page displays by editing attributes in Page Designer.
To edit a dialog page in Page Designer:
Parent topic: Creating Dialog Pages
6.6.4 Generating a Cancel Dialog Dynamic Action on the Dialog Page
For dialog pages that contain a Cancel button, create a dynamic action that controls what happens when the button is clicked.
The dynamic action must have True Action event which is set to Cancel Dialog.
This dynamic action will use the cancellation JavaScript call contained in the page
template (apex.navigation.dialog.cancel
) to handle the canceling
the dialog.
See Also:
Parent topic: Creating Dialog Pages
6.6.5 Generating a Close Dialog Page Process on the Dialog Page
Close a dialog page by creating a Close Dialog page process.
In previous releases, this Close Dialog page processes were referred to as a
Close Popup Window
. This dialog will use the closure JavaScript
call contained in the page template (apex.navigation.dialog.close)
,
to handle the closing of the dialog. The page process also supports the return of
dialog page items, which you may wish to reference on the parent page.
Tip:
You can also close a dialog page with the Close Dialog dynamic action. Both the dynamic action and the process support returning dialog page items. Use the page process when the page needs to be submitted and use the dynamic action when the page does not need to be submitted. Both end up calling the closure JavaScript call. Alternatively, you can create a page branch, which will close a dialog page and redirect to the page specified in the branch.
Parent topic: Creating Dialog Pages
6.6.6 About Branching with Dialog Pages
Open dialog pages using buttons or links.
Dialog pages support the following branching options:
-
Dialog page to dialog page.
You can branch from one dialog page to another dialog page if:
- Both pages have the same Page Mode. For example, a Modal Dialog page and a page where the dialog Chained attribute is set to On. Setting the Chained attribute to On enables support for chained or nested dialogs such as the dialogs that appear in many internal APEX wizards. Chained or nested dialogs enable you to re-use a dialog window to display each page.
- Dialog page to Normal page.
- When branching from a dialog page to a normal page, the dialog page is closed and the user navigates to a new page in the browser. The new page can be a parent (or launching) page or another Normal page in an application.
Parent topic: Creating Dialog Pages
6.6.7 Handling Refresh Actions on Parent Page
Learn about handling refresh actions on parent pages.
If you have generated a Close Dialog page process on the dialog page, you must implement refresh actions on the parent page using the new Dialog Closed
dynamic action event type. You can use the set type Dialog Return Item when creating a Set Value True Action, to set a single value, based on the return item of a dialog.
Tip:
For a partial page refresh of a parent page, implement the close dialog with dynamic action (for example, for report and form pages where you want to edit data in a modal dialog form and only want the report refreshed on close). In contrast, branching is the best approach if you have a multi-step modal wizard or if you have several possible target pages when closing the dialog.
See Also:
Parent topic: Creating Dialog Pages