Video: Part 3 – Adding styling with CSS

Before & After with CSS

This video is all about CSS styling.

You’ll see me working on the list created in the previous episodes (Part 1 and Part 2) and transform it to something a lot more interesting.

In this 42 minute video you’ll find:

  • 02:30 to 10:20 — Style the list container and setup the structure.
  • 10:21 to 19:00 — Style list elements.
  • 19:01 to 37:20 — Style the controls within a list element including hover states.
  • 37:21 to 38:52 — Using HSL to find colors.
  • 38:53 to 42:25 — A little border, saving CSS with the Theme Roller, and wrap it all up including the before and after.

Part 3: Adding styling with CSS from Jorge Rimblas on Vimeo.

Coming next… Drag & Drop!!!

Oh, one last thing, did you like the new video bumpers? I’m pretty excited about them.
Music licensed from Envato’s AudioJungle.

Posted in APEX, Classic Reports, CSS, Oracle, Video, Web

Video: Part 2 – APEX Classic Report Named Column Templates

I’m happy to bring you installment Number 2 of this video series. If you missed the first one, you can find it here Part 1.

We’ll call this the “Dynamic Action” edition because that’s what most of the video deals with.

In this 39 minute video you’ll find:

  • 0:00 to 5:49 — Fix a bug from part 1.
  • 5:50 to 30:49 — Add ability to toggle the todo checkboxes by just clicking them.
  • 30:50 to 39:00 — Add a “Trash” icon to delete a todo entry.

Part 2: APEX Classic Report Named Column Templates from Jorge Rimblas on Vimeo.

At around 13:23 some sort of noise affected the recording. Not sure why. Unfortunately, it did affect the quality of the rest of the recording. I’ll have to look into that and resolve it before recording 003.

Next: Part 3

Posted in APEX, Classic Reports, Video

Video: Part 1- APEX Classic Report Named Column Templates

As part of my Kscope16 presentation “Hooked on Classic (Reports)
Learn tips & techniques to make them sing” (live slides here). I demoed a Classic Report with a custom template (a Named Column template), made to look like a list. I thought it would be useful to show all the steps of how that demo was built.
The full video is 36 min. however, only the last 16 min are for the building of the template example. When you’re done with this one, watch the follow-up video where I extend the functionality with some useful Dynamic Actions.

Note: If you only care about the building of the template, skip to min 20 in the video.

APEX Classic Report Named Column Templates from Jorge Rimblas on Vimeo.

If you like this format, and you like what you see, please let me know in the comments or twitter.

Next: Part 2

Posted in APEX, Classic Reports, KScope, Oracle, Video


You may be familiar with the UNION operator in Oracle SQL, but are aware of the UNION ALL operator?

Perhaps you will be surprised to hear that more often than not when you write UNION, what you meant to use is UNION ALL.

The UNION operator is used to combine result sets from multiple SELECT statements into a single result set. However, it eliminates duplicates in process.

In order for the database to do this the database will need to join the two result sets, sort them, find the duplicates and eliminate them.

Hey wait a minute, sort the results? Yes, the most efficient way to eliminate duplicates is to order the results and then find the duplicate entries. To make matters worse, if you have a “large” amount of data, this sort operation may not be able to be performed in memory (which would be the most efficient approach).

UNION ALL on the other hand will combine the result sets as they are. It will return all rows.

There’s clearly a use case for both scenarios. However, I would submit to you, more often than not, what we really want is to combine all the rows.

Be aware, that when using UNION you’re asking the database to do more work, make sure that’s what you really want.

I know that if you search for UNION vs UNION ALL you’ll find a gazillion results. But hey, I keep seeing UNION misused, so maybe we need one more blog about it.


Posted in Oracle

Winds of Change

After three and half years at Enkitec, the last 1.5 of those years as Accenture Enkitec Group, it’s now time to make a change. It has been a great ride with a lot of highs, success, and accomplishments. I couldn’t be more thankful. It’s right up there with one of the best decisions I’ve made in my career. I made many new friends and learn from some of the best and brightest people in the industry.
However, change can be powerful and positive. I’m excited to announce I’ve accepted a position with Insum Solutions. This new adventure starts on February 1st, 2016.

The decision didn’t come easy, but a move to a company dedicated to APEX, full of APEX Experts (and Oracle Specialists) gets my blood pumping. I’m excited about the new challenges and opportunities. To me, this move is about my interest, excitement, and commitment to Oracle Application Express. #LetsWreckThisTogether !

Posted in Uncategorized

Using Select2 on APEX tabular forms

I love the Select2 jQuery plugin. It’s a feature rich, good looking, select list replacement. As an APEX developer, it makes sense to use the excellent plugin from Nick Buytaert. Since its announcement, in Aug 2013, you would be hard pressed to find an APEX application where I don’t use it.

All that said, APEX doesn’t (yet) support plugins on tabular forms. This blog post is about documenting the JavaScript and Dynamic Actions (DA) you could use to use it as part of a tabular form.

The Quick and Easy Approach

If your tabular form contains a Select List already, this method is for you. It will work whether you used a Column Type of “Select List” or APEX_ITEM in it’s various forms: apex_item.select_list , apex_item.select_list_from_query or apex_item.select_list_from_query_xl.

  1. You include the Select2 library on the page. (more on this in a moment)
  2. You target your Select Lists with jQuery and run the .select2() method on them. Yup, that’s it.

Step #2 may look like this:

or if you have any options to include:

Check out this demo. (Click on the “Apply Select2” button).

The button runs a simple DA that runs the code above. Notice that, if you’re using the Universal Theme in APEX5 you may want to remove the select list styling applied by the class “u-TF-item–select”. Use a command like this:

Let’s talk about #2 above. In order to include the Select2 library on the page, I like to “cheat” whenever possible and have at least one Select2 APEX item plugin on the page. Doing this will include all the JavaScript and CSS that you need to run the .select2() method. That’s exactly how the previous demo page works.

The (slightly) Messy Approach

However, if it’s not possible or desirable to include a regular Select2 item on your page, you’ll have to manually add the necessary libraries. This can get a little tricky if say for example you download the Select2 jQuery files, they don’t match the version used by the plugin, and then later you add a Select2 item plugin to the page.  You’ll want to be careful with that.  For this reason, I like to use the same files that the Select2 item plugin is using. That’s also not ideal because you could upgrade the plugin and then again be in conflict with the versions. My preferred approach is to move the file includes of the Select2 APEX plugin to their own procedure. Share that new procedure between the Select2 APEX plugin and my own, simple, “Manual Select2” plugin. You always move all plugin code to a package don’t you? (perhaps that’s a conversation for a different blog post).
This new “Manual Select2” plugin is what we’ll use to initialize the select lists on a tabular form.

My new procedure with the includes looks like this:

The original Select2 plugin changes to something like this:

For the new plugin, we’ll use a Dynamic Action type plugin with an Initialize category. It will have only one custom attribute for the component. The attribute will be used to contain the code that will initialize the select2 items.

Select2 Manual Plugin

When we use the plugin, the code “JS Function” can look like this:

Or it can be a lot more complicated, for example:

As you can probably tell from this code, you’re not limited to using this on tabular forms. With this technique you can use the full power of the Select2 plugin, like for example using the formatResult or formatSelection options that allow you to specify a function that formats how the values are displayed.

This technique does require some trial an error, but hopefully it gives you a starting point to extend the capabilities of your applications.

Check out the demo using the Manual Select2 plugin approach.
Here’s the plugin dynamic_action_plugin_com_enkitec_manual_select2.sql.

The code code of the Manual Select2 plugin looks like this:

It basically takes the code you provide (the code to initialize select2), wraps it with a function and calls it on page load.

If you provide the code:

The function will look something like this (additional formatting added for clarity):


UPDATE Feb 7, 2016: I’ve added a new fully working example implementing Lazy Loading.


Posted in APEX, Javascript, Oracle, Plugins

Fill the Glass: Measuring Software Performance

I had the delight of participating on a “Fill The Glass” webinar (#FillTheGlass). Fill the Glass is a new style of, technology related, webinar series by Cary Millsap.

Cary Millsap is a developer, teacher, writer, and consultant who has been a part of the Oracle ecosystem since 1989. His new webinar series about Oracle and related technologies is going to be little different than the usual hello-slide-show-Q&A-bye routine. These shows are going to include conversation. Our aim is to bring the technology to life. Our guests will of course talk about the problems they’re solving and how they solve them, but our conversations will include discussions about their ideas, their motives, their tools, …even their careers. Cary likes to find the twist, a way of perceiving a situation that you might not have thought of. Join us to learn, improve your career, and have some fun.

In this episode of Fill the Glass, Cary and I discuss techniques for measuring software performance. Some of the topics include instrumenting your code, measuring workloads, SQL Plan Management (SPM) and code development ideas in general that you may be able to apply to your projects.
Although the application in the video was built with Oracle Application Express, the concepts are universal to programming. At the very least, very current and apropos for Oracle developers of any kind.

The recording is now available here:

Fill the Glass Episode 4 with Jorge Rimblas – Measuring software performance in the real world from Enkitec LP on Vimeo.

Related links of topics seen or mentioned during the webcast:

Posted in APEX, Interviews, Oracle, Video

Expert Oracle Application Express 2nd Edition

I’m really excited to share with you that the 2nd Edition of APRESS Expert Oracle Application Express (Amazon link) is now released. Some of the concepts in this book may apply to previous versions of APEX, but this book was created with APEX5 in mind.

Expert Oracle Application Express

This book is the result of hard work from 14 authors: Doug Gault, Tom Petrus, Denes Kubicek, Roel Hartman, Dan McGhan, Francis Mignault, Raj Mattamal, Martin D’Souza, Christoph Ruepprich, Dimitri Gielis, Nick Buytaert, Karen Cannell, John Scott, and myself.

I should also mention the expert help of the APRESS team and the technical reviewers: Patrick Cimolini, Vincent Morneau, and Alex Fatkulin.

By the way, all but one of those authors and technical reviewers are on Twitter. If you’re an Oracle professional and work with Application Express, I recommend you follow them.

The book is comprised of 14 chapter over 650 pages.

1. APEX Builder, Denes Kubicek
2. Oracle REST Data Services, John Scott
3. Oracle APEX 5.0 Charts Inside Out, Dimitri Gielis
4. Tabular Forms, Denes Kubicek
5. Team Development, Roel Hartman
6. Globalization, Francis Mignault
7. Debugging, Doug Gault
8. Dynamic Actions, Martin Giffy D’Souza
9. Lifecycle Management, Nick Buytaert
10. Plug-Ins, Dan McGhan
11. jQuery with APEX, Tom Petrus
12. Map Integration, Christoph Ruepprich
13. Themes and Templates, Jorge Rimblas
14. Report Printing, Karen Cannell

One more piece of information. All proceeds from this book go to the families of two exceptional people that left us way too soon: Carl Backstrom and Scott Spadafore. Both members to the APEX team and instrumental in laying the foundation that has gotten Application Express to where it is today. Although I never met them in person, their knowledge sharing and efforts in the community to help people like me better learn and use APEX helped me immensely.

Posted in APEX, Oracle

Enhancement to waitPopup on APEX5

APEX 5 has a nifty nice enhancement to the use of apex.widget.waitPopup. It now returns a “remove” function you can call to remove the wait indicator.

The Details

I’ve used apex.widget.waitPopup many times. You simply call it like this:

In APEX 4.x, you would see the following animated GIF.

APEX 4.x waitPopup

APEX 4.x waitPopup

Often, you would call it before submitting the page if you had a long running step. Then when the page refreshes it would be gone. If instead you were going to remain on the page, you had to manually remove it.

Notice the use of setTimeout as sometimes, inside of a Dynamic Action, the page rendering would be frozen and you wouldn’t see the wait indicator.

To remove the overlay and the wait GIF image you would have to remove them from the DOM with the jQuery .remove();

However, now on APEX 5, apex.widget.waitPopup returns a remove() function you can call to handle this for you. I find this a much nicer and elegant approach.

This is how the new waitPopup looks in APEX5.

APEX 5 waitPopup

APEX 5 waitPopup

Posted in APEX, API, Javascript, Oracle

12c WITH inline PL/SQL, json_from_sql, Bind Variables and AJAX

I recently got to use a new cool feature in Oracle 12c R1, the WITH clause with inline PL/SQL (read more at oracle-base). Then Scott Wesley blogged about it and I made a comment on twitter. But don’t stop reading just yet just because you’re not using 12c.

Then, Nick Buytaert blogged about the new “Lazy Loading” feature on his APEX Select2 plugin (using apex_util.json_from_sql) and I made some comments on his blog post. By this point I figure it was time to do a proper blog post linking all these things together.

The WITH clause with a PL/SQL Function feature is important, heck I think it’s fantastic. However, just because you’re not on 12c yet you should dismiss the technique outlined here. So read on. First, lets define a scenario to use the functionality.  Lets say you are using the Select2 plugin and have an On-Demand process that will generate a JSON string with your matching values.  You would need something that looks like this:

This is easily generated by apex_util.json_from_sql. The SQL to generate this result would like something like this:

The Select2 plugin will pass a search term to the On-Demand process and we need to use it in our SQL statement. The search term will be passed to our On-Demand Process in apex_application.g_x01. Unfortunately, we cannot (yet) use apex_application.g_x01 directly in our SQL like this (because it’s a global package variable outside of our scope):

But SQL could use a PL/SQL function, so we need to wrap apex_application.g_x01 with a PL/SQL function so that we can pass it to apex_util.json_from_sql. In 12c this can now be done right in the SQL statement! Plus it comes with a performance benefit.

But if you’re not in 12c yet, you would need to create a function (preferably inside a package) and then use in your SQL. Or, as Christian Neumueller noted in the comments, if you want to save a step just use the very handy V function with v('APP_AJAX_X01') to retrieve the value of apex_application.g_x01.

But, please, please, whatever you do, do not concatenate the value as a string right into the SQL as that opens the door to SQL Injection. I’m not even going to write that code option here as I wouldn’t want anyone to copy paste it. :)

Borrowing a test harness from Tim Hall of oracle-base fame. Here’s a quick test of the performance difference between the new WITH function clause, a regular PL/SQL function and the V function.

Of course, your millage may vary, but I find the results very interesting. Always do your own testing and validations.

Posted in 12c, APEX, JSON, Oracle

Oracle APEX

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.