Skip to main content

My two favorite APEX 5 features: Regional Display Selector and Cards

We (the over-sized development team for the PL/SQL Challenge - myself and my son, Eli) have been busy creating a new website on top of the PLCH platform (tables and packages):

The Oracle Dev Gym!

In a few short months (and just a part time involvement by yours truly), we have leveraged Oracle Application Express 5 to create what I think is an elegant, easy-to-use site that our users will absolutely love. 

We plan to initially make the Dev Gym available only for current users of PL/SQL Challenge, so we can get feedback from our loyal user base. We will make the necessary adjustments and then offer it for general availability later this year.

Anyway, more on that as the date approaches (the date being June 27, the APEX Open Mic Night at Kscope16, where I will present it to a packed room of APEX experts).

What I want to talk about today are two features of APEX that are making me so happy these days: Regional Display Selector and Cards.

Regional Display Selector (RDS)

This is not a new feature to 5, but it sure works nicely and looks great! RDS gives you a way to easily create tabbed "sub-pages" on your page. You move oh-so-quickly between the content on each tab, because the page is not being refreshed. 

And they are so easy to set up! You define the "tab" region with a type of Region Display Selector:

Then if you want a region to be appear as a tab, simply change the RDS setting in Properties for that region to Yes.

This sort of high-level declarative approach to designing sites makes me happy. Sure, the RDS feature could be more configurable, and I am sure it will be in future releases. In the meantime, it offers a great combination of super productivity and nice UI with minimal coding.


So in our redesign of PL/SQL Challenge, we wanted to accomplish, hmmm, well, actually many things, but here was a big one: make the site responsive. Allow users to easily take a quiz on their tablet, maybe even their phone. 

You can do it with the current set, as players have told me so, but it isn't the most pleasant experience. We simply didn't design the site with that in mind five years ago.

But now? It's a necessity and fortunately APEX 5 generally and the Universal Theme in particular makes that much easier to accomplish. 

One key element is our shift to using cards. The first image in this post shows the Dev Gym home page, featuring big, attractive "buttons" a user can click or press to make their selection. These are actually "cards".

What this means is that I create a region of type Classic Report. I then drill down to the Attributes for the region, and set the template to Cards:

I can then set all sorts of options. For example, I can choose to Display Icons and then simply specify a FontAwesome icon by name, associating in the query with a card_icon column. 

That's it. From there APEX 5 takes over and does its beautiful job. Of course, if you want to tweak the built-in behavior and so some really "fancy" stuff, then you can use JavaScript.

You can. I can't, because I have not learned JavaScript. Fortunately, that's been one of Eli's main foci in his APEX work, so I have him work that magic.

There is one particular usage of Cards we are exploring that replaces a LOV selector against a tree. I think the approach is very intuitive and way better suited to mobile device usage. We will soon see what our users think of it.

So bottom line: if you are using Oracle Application Express 5 you really owe it to yourself to explore and make best use of these two great features: the Region Display Selector and Cards.


  1. How can I get these card to show icons?

  2. Click on Region Attributes.
    Click on Template Options
    Set Icons to "Display Icons".

  3. Thanks very much for this, I came across the site and did a few searches for the card display before hitting on your blog. Thanks a million.

  4. If one page contains two RDSes, how to allocate different regions to separate RDS?

    1. Ming, I am not an expert in this so I am going to answer, but also post a note on Twitter and see what we get. I checked in with my lead APEX developer on the Dev Gym and we concluded as follows: As you imply, there is no way, when saying that a region is part of an RDS, to say *which* RDS. Maybe you could figure out how to get something like this to work, but you would be better off not trying. Instead, break them up into two pages.

  5. You can change the RDS regions to Static regions w/Tab Container template. This will give you a new area on the regions, labeled Tabs, that accepts other regions like the Subregion area does. Those Tab subregions will then appear as tabs for their parent regions just the way you specified. This may also work with other region types as the parent, but the Static region is what I usually use.

  6. Hi Steven and Art,

    You are both right. There is no "default" way to get this. And I tried changing the region type and template. They both worked but "Show All" tab would missed.

    In order to learn more about APEX and plugin logic, I got the RDS customizable plugin from the link: for APEX 4.0. And this week I modified slightly to match what I wanted. Now I released a demo online here:

    From 4.0 to 5.1, the front end logic for RDS changed a lot and there are still a couple of small bugs for this plugin with new widget.apexTabs.js. But it's really worth to try.

  7. Hi,

    I am trying to give different icon to each card but i couldnt. What I do is just work for giving one icon for all the cards so all the cards have same icon at same page so it is not useful. Do you have any idea how to give each card different icon?

  8. why is it card template is missing or not showing in the template options..


Post a Comment

Popular posts from this blog

Get rid of mutating table trigger errors with the compound trigger

When something mutates, it is changing. Something that is changing is hard to analyze and to quantify. A mutating table error (ORA-04091) occurs when a row-level trigger tries to examine or change a table that is already undergoing change (via an INSERT, UPDATE, or DELETE statement). In particular, this error occurs when a row-level trigger attempts to read or write the table from which the trigger was fired. Fortunately, the same restriction does not apply in statement-level triggers.

In this post, I demonstrate the kind of scenario that will result in an ORA-04091 errors. I then show the "traditional" solution, using a collection defined in a package. Then I demonstrate how to use the compound trigger, added in Oracle Database 11g Release1,  to solve the problem much more simply.

All the code shown in this example may be found in this LiveSQL script.

How to Get a Mutating Table Error

I need to implement this rule on my employees table:
Your new salary cannot be more than 25x th…

Table Functions, Part 1: Introduction and Exploration

August 2018 update: please do feel encourage to read this and my other posts on table functions, but you will learn much more about table functions by taking my Get Started with PL/SQL Table Functions class at the Oracle Dev Gym. Videos, tutorials and quizzes - then print a certificate when you are done!

Table functions - functions that can be called in the FROM clause of a query from inside the TABLE operator - are fascinating and incredibly helpful constructs.

So I've decided to write a series of blog posts on them: how to build them, how to use them, issues you might run into.

Of course, I am not the first to do so. I encourage to check out the documentation, as well as excellent posts from Adrian Billington (search for "table functions") and Tim Hall. Adrian and Tim mostly focus on pipelined table functions, a specialized variant of table functions designed to improve performance and reduce PGA consumption. I will take a look at pipelined table functions in the latte…

Quick Guide to User-Defined Types in Oracle PL/SQL

A Twitter follower recently asked for more information on user-defined types in the PL/SQL language, and I figured the best way to answer is to offer up this blog post.

PL/SQL is a strongly-typed language. Before you can work with a variable or constant, it must be declared with a type (yes, PL/SQL also supports lots of implicit conversions from one type to another, but still, everything must be declared with a type).

PL/SQL offers a wide array of pre-defined data types, both in the language natively (such as VARCHAR2, PLS_INTEGER, BOOLEAN, etc.) and in a variety of supplied packages (e.g., the NUMBER_TABLE collection type in the DBMS_SQL package).

Data types in PL/SQL can be scalars, such as strings and numbers, or composite (consisting of one or more scalars), such as record types, collection types and object types.

You can't really declare your own "user-defined" scalars, though you can define subtypes from those scalars, which can be very helpful from the perspective…