A-3220 Avoid regions in the dialogs position without a dialog template.
Reason
Regions in the Dialogs, Drawers and Popups position are meant to open on demand as an inline dialog, drawer or popup. Only the Inline Dialog, Inline Drawer and Inline Popup templates provide that behavior (hidden by default, overlay, close button). With any other template, or none, the region is rendered at the end of the page and is always visible, and apex.theme.openRegion cannot open it.
Set the region template to Inline Dialog, Inline Drawer or Inline Popup, or move the region to another position if it is not meant to be a dialog. The check knows only these three Universal Theme templates; if the application uses its own dialog template (a copy with another name) or another theme, the finding is a false positive and can be suppressed for that region.
Example
Non-Compliant Example
page 10 (
// ...
region edit-customer (
name: Edit customer
type: staticContent
layout {
slot: dialogsDrawersAndPopups
}
appearance {
template: @/standard
}
advanced {
htmlDomId: edit-customer
}
)
) | Line | Column | Message |
|---|---|---|
| 10 | 23 |
Compliant Solution - ★★★★★
page 10 (
// ...
region edit-customer (
name: Edit customer
type: staticContent
layout {
slot: dialogsDrawersAndPopups
}
appearance {
template: @/inline-dialog
}
advanced {
htmlDomId: edit-customer
}
)
) Tests
Test SQL query
select aa.workspace || '.' || aa.alias || '.' || r.page_id || '.' || coalesce(r.static_id, to_char(r.region_id)) as identifier,
'Region ' || r.region_name || ' on page ' || r.page_id || ' of app ' || aa.alias || ' in ' || aa.workspace
|| ' is in the Dialogs, Drawers and Popups position but uses the "' || r.template || '" template.' as message
from apex_application_page_regions r
join apex_applications aa
on aa.application_id = r.application_id
and aa.workspace = r.workspace
where aa.workspace in (#ApexWorkspaces#)
and r.display_position_code = 'REGION_POSITION_04'
and r.template not in ('Inline Dialog', 'Inline Drawer', 'Inline Popup')Test results
| Identifier | Message | Migration |
|---|---|---|
| WORKSPACE.CUSTOMERS.10.edit-customer | Region Edit customer on page 10 of app CUSTOMERS in WORKSPACE is in the Dialogs, Drawers and Popups position but uses the "Standard" template. | - |
Parameters
Use parameters to customize the rule to your needs.
| Parameter | Description | Default Value |
|---|---|---|
| ApexWorkspaces | Comma-separated List of APEX workspaces owning APEX applications to check. | dblinter, dbl_gui |
References
- same as UC-3220