A few weeks ago, immediately after the release of APEX 22.2, my colleague, Lee Burgess, wrote a blog titled APEX 22.2 - New Features Spotlight. This focused on three of the key new features of the latest release of APEX: the new Application Search, the Invoke API Process and the new Date Picker. Remember, whatever the changes, our expert team is here with a range of services to help you understand and maximise your APEX capabilities. In this blog, picking up from where Lee left off, I focus on a few other APEX features new to v22.2.
A new Dynamic Content region has replaced the now-marked-as legacy PL/SQL Dynamic Content region. The two region types are very similar, but have a few key differences, as outlined below.
The new Dynamic Content region:
To illustrate this, the code snippet for my Dynamic Content region below returns HTML, incorporating a date stamp, as a clob. There is no use for the HTP package.
For my application, I created a similar legacy PL/SQL Dynamic Content region (see below). On clicking the refresh button, a dynamic action attempts to refresh both regions, but only the New Dynamic Content region does refresh, resulting in the later timestamp.
CLOB support is available, so you can now store more than 32K characters in page items and Interactive Grid columns. This is defined via the Session State Data Type component property, available for Textarea, Display Only, Hidden, Rich Text Editor, and Markdown Editor components.
Computations, Validations, Source and Default processes have been changed to incorporate CLOBs. Bind variable references within PL/SQL will be of the specified session state data type i.e. VARCHAR2 or CLOB.
So again, comparing the new CLOB support with previous APEX releases, the below screenshot compares an old text area (non-CLOB) with a new test area with CLOB data type. Loading content from the same CLOB value in the database, the non-CLOB page item would truncate the data held in session to 32k characters, whereas the CLOB-supported item stores all the data in session.
Alongside the application CLOB support, there is a new APEX_SESSION_STATE API package providing utilities for reading and assigning sessions state values. This includes the GET_CLOB function that returns the value of a specified item as a CLOB.
As well as the new Search Region, introduced in Lee’s blog, APEX 22.2 sees the introduction of a new Item Container region template. This, alongside extended support for item positions across additional region template positions such as CREATE, EDIT, PREVIOUS, and NEXT, is designed to provide greater flexibility and make it easier to position Items and Buttons together.
Items can now be placed alongside buttons in various placeholders within the region template, which can be configured in the Layout Position in the item’s property.
The new Item Container region is not a region template available via the gallery but via the Appearance > Template property for a region component.
The template provides a placeholder for a page item and placeholders (BUTTON START and BUTTON END) to position buttons before or after the item.
The Template Options for the Item Container region include an Alignment option to affect how the buttons align with the associated page item.
I found that the Item Container region works well for aligning buttons to a page item where that page item uses a Floating or Hidden Appearance Template. With the Optional/Required template, using an Item Container, we lose the ability to specify a Label Column span resulting in a slight misalignment of the item with other items on the page.
The screenshot below shows for comparison:
These additional features incorporated into the APEX 22.2 release have simplified and improved functionality around dynamic content, CLOB handling and positioning buttons and items alongside each other.
Check out the full list of new features and demo videos here.