More New Features of APEX 22.2

Philip Ratcliffe Dec 15, 2022 10:55:36 AM

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. 

Dynamic Content Region

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:

  • Must return the HTML (as a VARCHAR2 or CLOB), it is not generated by the HTP package
  • Is now a refreshable region
  • Supports JavaScript (MLE) on databases 21c and above

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.

Dynamic Content Code

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.

Dynamic Content Refresh

New CLOB Support

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.

3. CLOB property[4450]

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.

Clob Content

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.

Universal Theme Updates

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.

Item Positions

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.

Item Container

The Template Options for the Item Container region include an Alignment option to affect how the buttons align with the associated page item.

Item Alignment

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:

  • The placing of an item in a button placeholder (EDIT position)
  • A text item with an optional template
  • A text item with an optional template in an Item Container region with a button in the BUTTON END position
  • A text item with a hidden template in an Item Container region with buttons in both the BUTTON START and BUTTON END positions
  • A text item with a floating template
  • A text item with a floating template in an Item Container region with buttons in both the BUTTON START and BUTTON END positions, using the Stretch alignment option

Universal Theme Changes

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.

If you would like to find out more information speak to one of our Oracle APEX experts, get in touch through enquiries@dsp.co.uk or book a meeting...

Book a Meeting