A quick look at APEX 22.2 - Dynamic Actions, Number field, Template Directives, Session State

A quick look at APEX 22.2 - Dynamic Actions, Number field, Template Directives, Session State

Check my first impressions of some of the most exciting new features in APEX 22.2


4 min read

What's new in APEX 22.2

After having gone through some of the APEX 22.2 new features in details, here I will share with you some others that would greatly improve the developer experience in first place. My reviews so far of the APEX 22.2 new features:

πŸ”— A glimpse of the APEX 22.2 new features - Device Geolocation

πŸ”— A glimpse of the APEX 22.2 new features - Vector Map tiles

πŸ”— A glimpse of the APEX 22.2 new features - Autocomplete

πŸ”— Make your app stand out using Meta Tags - better SEO and shareability

πŸ”— See here the full list of new features in APEX 22.2

Naming Dynamic Actions

You can now specify a custom name for your True or False actions, enabling you to remove the guesswork from selecting the right action within Page Designer.

View the original idea request in the APEX Ideas App.

The new Name input on the True/False action

Built upon request from the APEX community, this feature is really helpful when you have a big number of Dynamic Actions, each having a big number of True/False Actions. Prior to that version, you had to go through each of them to see what they actually do in case you wanted some logic being changed. It happen a lot faster now just naming them and going through the list. And to illustrate that, here is an example of a Dynamic Action with multiple True actions in 22.1 and 22.2:

The list of True/False actions in APEX 22.2 and prior versions

In addition, each Action is now having its own icon, which makes it even easier to visually recognise the Action Type. Good job, APEX team!

Number Field

Support easier number entry on smartphones and tablets with the new Virtual Keyboard attributes.

Just like the Text Field with Autocomplete it has some improvements. One of them, adding the Row CSS Classes option, other one - adding inputmode="decimal" property to the input HTML element, so that it automatically displays a numeric keyboard when used on mobile device.

Number item

Louis Moreaux saw that need and added this recommendation in early September to his blog post on Improving APEX mobile applications.

Wider Support for Template Directives

You can now use Template Directives in HTML Expressions of Classic and Interactive Report columns, enabling you to remove conditional output logic from your SQL queries.

πŸ”— Learn more about Template Directives

πŸ”— Also check Jon Dixon's blog post on Template Directives.

One of my personal favourites. For a long time, the only options to format Report data with some custom HTML was to do it directly in the select statement or to create a custom Template in Shared Components.

Having the Template Directives tackled that and I am using it whenever possible. Here is an example:

Template Directives

{case SOURCE/}
{when strava/}
<img width="28px" alt="#SOURCE#" title="#SOURCE#" src="#APP_IMAGES#icons/strava_logo_64_64.png">
{when fitness_challenge_app/}
<img width="28px" alt="#SOURCE#" title="#SOURCE#" src="#APP_IMAGES#icons/app_icon_64_64.png">

What this template does is check the value of my Report SOURCE column and applies different HTML based on the value.

The benefit is that your Report SQL query still looks pretty, and at the same time you have the conditional output on your page.

Let's hope Template Directives continue to be supported in more and more APEX components!

Session State Data Type

CLOB Support for Page Items

  • Now you can store values larger than 32K characters in page items and Interactive Grid columns.

Session State Data Type

  • Items have a new attribute Session State Data Type, available for Textarea, Display Only, Hidden, Rich Text Editor, and Markdown Editor.

Extended CLOB Support

  • Computations, Validations, Source, and Default processes have been extended to support working with CLOBs.

Bind Variables

  • In a PL/SQL process, bind variables will be of the chosen data type. You can also use the new apex_session_state.get_clob('P1_ITEM') API to retrieve the CLOB value.

Here is the most important you need to know regarding the use of CLOBs in the new version of APES:

  • We now have the capability to save extra-large values in session state - CLOBs
  • Until now, submitting a page item longer than 4000 or 32000 characters (depending on your database settings) would result in its truncation and loss of data because VARCHAR2 data type was used to store the values.
  • In 22.2 developers can select between a VARCHAR2 and CLOB datatype. This happens in the new attribute group Session State of your item settings

Session State attribute group

  • This new attribute is enabled for Text Area, Display Only, Hidden, Rich Text Editor, Markdown Editor and Plugin editor
  • A new public package in the APEX API is now available - APEX_SESSION_STATE. It is used for getting and setting Session State values.

πŸ”— Read the Official Oracle Documentation

Learn more

πŸ”— To learn more about the new features, watch the official release videos.

Follow me

Liked that post? Follow me on Twitter and LinkedIn!

πŸ”· @plamen_9 on Twitter
πŸ”· Plamen Mushkov on LinkedIn