3 New Features
Oracle APEX release 22.2 includes a number of new features. These new features are not present in APEX release 22.1 and earlier releases.
- Application Search
- Invoke API Process Type
- New Dynamic Content Region
- Approvals Functionality Updated
- Page Item Session State Data Type - CLOB
- Date Picker
- Support for Template Directives in Classic and Interactive Reports
- Number Page Item Enhancement
- Vector-Based Map Support
- Progressive Web App Enhancements
- Naming Actions of Dynamic Actions
- Landmark Support for Regions
- Debounce and Throttle Dynamic Actions
- Updated Rich Text Editor
- Drawer Modal Dialog Template
- Updated Global Search (Spotlight Search)
- JavaScript API Updates
- PL/SQL API Updates
- JavaScript Library Upgrades
3.1 Application Search
- Create multiple search configurations by defining searchable data sources, search features, and display templates
- Search tables within the local database or use REST Enabled SQL or external REST data sources
- Leverage Oracle Text for linguistic and fuzzy search capabilities
- Provide search functionality to end users by adding multiple search widgets to a single application
- Configure options for:
- pagination
- search-as-you-type
- custom layout
- page size limit
- show results count
- lazy loading
- sorting
- custom messages for No Query Entered and No Results Found
3.2 Invoke API Process Type
- Page Designer automatically presets parameters and maps them to matching page items or interactive grid columns, if available.
- Use Synchronize Parameters to refresh parameter definitions.
- Invoke API is fully PL/SQL data type aware (
NUMBER
,DATE
,TIMESTAMP
,BOOLEAN
,CLOB
,BLOB
, etc.). - Supports complex data types like PL/SQL Records.
- Populate parameter values with Static Value, SQL Query, Page Item, Expression, and Function Result.
- Store the output of parameters or functions in Page Item.
- Automatically uses Page Item Format Mask for type conversions.
- Automatically uses Switch and Checkbox item type configuration for
BOOLEAN
conversion.
Restrictions
On Oracle database 12r1, you cannot use Invoke API if there is a BOOLEAN
parameter.
3.3 New Dynamic Content Region
- The region source must return the HTML value as a CLOB. The value is no longer output via the HTP package.
- The region is refreshable.
- The region supports lazy loading.
- The region supports PL/SQL and JavaScript (MLE).
select application_id, page_id, region_name
from apex_application_page_regions
where source_type = 'PL/SQL';
3.4 Approvals Functionality Updated
New Functionality
The approvals component has new functionality.
Copy Task Definition: Developers can now copy existing task definitions within the same application, or from one application to another. Participants, Actions, and Parameters are copied. Any shared component the task definition uses (like an email template or a REST data source) is copied into the target application if it does not already exist.
Request and Submit Information: Task owners can now request more information before completing a task. This sends the task back to the task initiator, who fills in the missing information before returning it to the owner for approval.
Action Logging: Actions can now be recorded in the task history log. You configure logging in the Task Definition Action Editor. You can choose whether to log successful actions, failed actions, all actions, or no actions. If you define a success message or error message, it is appended to the Messages column of the task history.
Update Due Date: The business administrator can now update the due date of an in-progress task. Changing the due date only affects the current task instance. The due date set in the task definition does not change.
- Due On Type, which can be set as
INTERVAL
,SQL QUERY
,EXPRESSION
,FUNCTION BODY
, orSCHEDULER_EXPRESSION
. - Due On Language, which is used when Due On Type is
SQL QUERY
,EXPRESSION
, orFUNCTION BODY
. Otherwise, this isNull
. - Due On Interval. When Due On Type is
INTERVAL
, this value is an interval in ISO or SQL format. Otherwise, the system uses the query or expression in this field to evaluate the date.
Advanced Date Configuration: When Due On Type is SCHEDULER_EXPRESSION
, the expression field should contain a valid DBMS_SCHEDULER
filtering expression. APEX evaluates the expression at run time using DBMS_SCHEDULER.EVALUATE_CALENDAR_STRING()
.
If you choose the ISO/SQL interval format, new task definitions created in 22.2 have INTERVAL
as the Due On Type.
- Stay available to approve or reject
- Expire, meaning they can no longer be approved or rejected
- Renew as a new task with a new due date from the same task definition
- Before Expire, for actions that happen before the task due date.
- Expire, for actions that happen after the task due date.
New APIs
apex_approval
package:
apex_approval.request_more_information()
- Used by the task's actual owner to get more information from the task initiator.apex_approval.submit_information()
- Used by the task initiator to send more information to the task's actual owner.apex_approval.set_due()
- Used by the task initiator or business administrator to set or update the due date for the task.apex_approval.add_to_history()
- Used in PL/SQL code for the task definition to log custom messages in the task history when the action executes.apex_approval.renew_task()
- Used by the business administrator to renew an expired task.apex_approval.handle_task_deadlines()
- In 22.2, a background job performs this work every hour. Developers can use this API for testing Task Expiration Policies and Before Expire and Expire Task Actions.
3.5 Page Item Session State Data Type - CLOB
Prior to this release, Page Items had an implicit session state data type of VARCHAR2
. This means the value rendered on the screen, submitted, computed, and validated, was a String, capped at either 4k or 32k bytes in length depending on the database configuration. In APEX 22.2, the internal infrastructure of page items and session state is reworked to support different data types. The first additional supported data type is CLOB
.
Setting the Data Type
- Textarea
- Display Only
- Hidden
- Rich Text Editor
- Markdown Editor
VARCHAR2
(default) and CLOB
. If you set the data type to CLOB
, it implies:
- The item source and computations can handle evaluating a CLOB value.
- The item can render, submit, and validate a CLOB value.
- The item's bind variable data type used in PL/SQL code is of data type CLOB.
- Due to restrictions of the
V
function, reading an item's value programatically must be done usingapex_session_state.get_clob(<item name>)
.
Interactive Grid Compatibility
The five item types that support the CLOB session state data type can also be used as Interactive Grid columns. Note that there are a number of edge cases where this combination isn't allowed, including setting CLOB for a Primary Key or a Master Detail column. Oracle does not recommend rendering too many large CLOB values on one page as it can cause performance issues for the browser. Oracle does recommend not having multiple CLOB columns and using a Page-type pagination.
APEX_SESSION_STATE
The new APEX_SESSION_STATE
public package is the central place for handling session state related operations. Refer to APEX_SESSION_STATE in Oracle APEX API
Reference for more information.
Plug-in Support
Item-type plug-ins can also opt into this new infrastructure. Developers must tick the new Session State Supports CLOB Standard Attribute for the item to display the Data Type attribute in Page Designer. Additionally, the render and validation callback code must be adapted to support CLOB values. The following API changes facilitate this:
APEX_PLUGIN
:type t_item is record (
...
data_type varchar2(32767), -- DEPRECATED
source_data_type apex_exec.t_data_type, -- NEW
session_state_data_type apex_session_state.t_data_type, -- NEW
...
);
type t_item_render_param is record (
...
value varchar2(32767), -- LEGACY
session_state_value apex_session_state.t_value, -- NEW
...
);
type t_item_validation_param is record (
value varchar2(32767), -- LEGACY
session_state_value apex_session_state.t_value -- NEW
);
Package APEX_PLUGIN_UTIL
:-- NEW: Overloaded version of print_escaped_value
procedure print_escaped_value (
p_value in apex_session_state.t_value );
-- NEW: Overloaded version of print_hidden
procedure print_hidden (
p_item_name in varchar2,
p_value in apex_session_state.t_value,
p_id_postfix in varchar2 defaultnull,
p_classes in varchar2 defaultnull );
-- NEW: Overloaded version of print_display_only
procedure print_display_only (
p_item in apex_session_state.t_item,
p_display_value in apex_session_state.t_value,
p_show_line_breaks in boolean,
p_escape in booleandefaultnull,
p_id_postfix in varchar2 default'_DISPLAY',
p_show_icon in booleandefaulttrue );
Oracle recommends referencing t_item_render_param.session_state_value
, as opposed to the now legacy t_item_render_param.value
, and using the new utilities in APEX_PLUGIN_UTIL
, which address handling the different data types.
Migration
All existing items are migrated to session state data type VARCHAR2
. You must switch existing items manually, because none of the existing items are set to CLOB by default. Newly-created items that are part of an Interactive Grid or a Form Region, whether they are created via Page Designer or the Create Page wizard, are set to CLOB
if their source data type is CLOB
.
Other Notes and Restrictions
- This feature applies strictly to page items, not application items. Application items remain
VARCHAR2
only. - When using Session State Data type CLOB in Interactive Grid columns or Form Region items, the Source Data Type must also be CLOB.
- Session State Data Type CLOB items cannot be referenced via the typical substitution string syntax
(&ITEM_NAME.)
on the server. This causes a runtime error. To display a CLOB item, use the respective page item in Read-Only mode or a Display Only item. You can also render the item programatically in a Dynamic Content region. In the client (for example, in template directives), the typical substitution string syntax for the CLOB data type works. - Within the Set Value dynamic action, Set Type PL/SQL Expression and PL/SQL Function Body cannot be used to return a CLOB. A workaround is to use Set Type SQL Statement or the Execute Server-side Code Dynamic Action by assigning the new value directly to the item and specifying the item in Items To Return.
- In the Interactive Grid, CLOB values cannot be downloaded.
3.6 Date Picker
The new Date Picker is built from the ground up for APEX and provides a streamlined user experience that is faster, more accessible, and lighter weight.
Today Button
The Today button allows users to effortlessly select today's date. You can easily enable this button via the Component Settings or from the Item Attributes.
Simple Behavior Control
Use HTML attributes to change the behavior of the date picker on the client side, without needing to use complicated JavaScript calls.
Fast and Accessible
The new Date Picker loads faster, responds quicker to user interaction, and is built to accessibility guidelines.
3.7 Support for Template Directives in Classic and Interactive Reports
APEX now supports Template Directives for columns that have an HTML expression in Classic Reports and Interactive Reports.
3.8 Number Page Item Enhancement
- Text - A regular alphanumeric keyboard.
- Numeric - A numeric-only keyboard. This option is useful for monetary values, PINs, ZIP codes, CC numbers, and similar entries.
- Decimal - A numeric-only keyboard with an added decimal key.
3.9 Vector-Based Map Support
- OpenStreetMap Positron
- OpenStreetMap Dark
- OpenStreetMap Bright
3.10 Progressive Web App Enhancements
The Progressive Web App (PWA) feature has new functionality.
PWA Feature Detection
APEX now uses feature detection to automatically determine if PWA is supported by the user's browser or device, and only displays the Install App button when PWA is supported. This prevents APEX from pushing for PWA on browsers and devices that choose not to support it.
PWA Screenshots
You can now add screenshots of your app. APEX uses the screenshots when prompting users to install the Progressive Web App. For best results, all screenshots should have the same aspect ratio.
PWA Shortcuts
- On touch-enabled devices - long-press on the application icon on the home screen
- On other devices - right-click on the application icon on the task bar
New Dynamic Actions
- Get Current Position - triggers the device to return its current position. Choose between three options:
- Returns the GeoJSON as a string to a page item
- Returns the latitude and longitude to two different page items
- Gets the full Geolocation Position object to use it in a JavaScript function
- Share - shares the current page of the application, a URL, or files with other applications
- You can share one file or multiple files, either statically defined or from a SQL query
Declarative Meta Tags
You can now define meta tags for your public-facing APEX pages directly from Page Designer. Combine this with the new Share dynamic action to display page previews on social media. Meta tags can also be used to increase a web app's SEO score.
New Public Views
APEX_APPL_PWA_SHORTCUTS
APEX_APPL_PWA_SCREENSHOTS
APEX_APPL_PAGE_META_TAGS
3.11 Naming Actions of Dynamic Actions
You can now name actions of dynamic actions with a custom description for better self-documentation in Page Designer.
3.12 Landmark Support for Regions
Landmarks redefine how screen reader users understand the structure of a web page. Building on previous support in APEX, regions now have full control over how they present as landmarks. Regions either use a template default or override their landmark at page level.
The Developer Toolbar now includes options to Show Landmarks and Show Headings.
3.13 Debounce and Throttle Dynamic Actions
- Debounce an action with a delay to execute it once after a specified time delay from the last time an event fires.
- Throttle an action immediately to execute it immediately and then in timed intervals if the event continues to fire.
You can also execute debounced actions immediately, or execute throttled actions with a delay.
3.14 Updated Rich Text Editor
- Toolbar Style lets you choose between Overflow Menu and Multiline.
- Overflow Menu - The toolbar displays items in one line. Items that exceed the toolbar width overflow into a popup menu.
- Multiline - The toolbar displays items in multiple lines, similar to behavior in CKEditor4.
- Allow Custom HTML enables the General HTML Support and Source Editing CKEditor5 plug-ins. Together, these plug-ins help bridge the gap between CKEditor4 and CKEditor5 by allowing custom HTML that can be edited inline.
Note:
Oracle recommends keeping this attribute disabled as it is intended for advanced usage and compatibility with content produced by CKEditor4.
3.15 Drawer Modal Dialog Template
The latest Universal Theme includes Drawer Dialog Template. This template can be selected if the page mode is Modal Dialog.
A drawer is an overlay window that pulls out from the sides of the screen. A drawer remains active and focused until the user has finished with it and closes it. While a drawer is active, the user is unable to interact with the rest of the page until the drawer is closed.
Create Application Wizard now creates Form pages as Drawer by default. Create Page Wizard defaults the Form Page Mode to Drawer if the application theme contains a Drawer page template.
3.16 Updated Global Search (Spotlight Search)
- search by page name and page alias
- in-app search by application alias. In-app search works with a colon (
:
) or dash (–
) between the application id or alias and the page id, name, or alias
3.17 JavaScript API Updates
New or Changed Functions, Methods, and Events
- New function
apex.util.throttle
- New parameter
pImmediate
added toapex.util.debounce
- New parameter
pIgnoreUnsavedChanges
added toapex.navigation.redirect
- New model events
destroy
andinstanceRename
- Method
model.clearData
now returns Boolean - New
mapRegion
propertyuseVectorTileLayers
- Renamed parameters
pFeatId
topFeatureId
andpFeat
topFeature
in somemapRegion
methods
Other Changes
- Changes attribute named "JavaScript Initialization Code" to "Initialization JavaScript Function"
- Improves descriptions for:
- how
apex.locale.toNumber
handles loss of precision apex.message.showPageSuccess
- a number of
apex.pwa
functions - a number of
mapRegion
methods item
interfaceapex.pwa.isInstallable
apex.pwa.openInstallDialog
- how
- Other various minor fixes and improvements to the JavaScript API documentation
3.18 PL/SQL API Updates
APEX_ESCAPE New Functions
APEX_ESCAPE
has new features:
csv
escapes any special characters in a VARCHAR2 or CLOB for output in a CSV filestriphtml
removes any HTML tags from a VARCHAR2 or CLOB- CLOB is fully supported throughout:
html_clob
html_allowlist_clob
html_attribute_clob
is_literal_clob
json_clob
APEX_LDAP Support for the Credential Store
The APEX_LDAP
APIs now support a new p_credential_static_id
parameter as an alternative to username/password. Use this parameter to avoid hardcoding the credentials in packages or storing them in other insecure ways. Now, you can store the credentials in App Builder, under Workspace Utilities, Web Credentials.
Other Updates
The APEX_THEME
API has new examples for disable_user_style
and enable_user_style
.