22 July 2013

APEX: Tree with Checkboxes

The APEX Tree component is based on jsTree which is a jQuery Tree Plugin. However not all functionality is implemented in APEX. Knowing the component on which it is based, we can find the documentation and enhance the Tree in APEX. One of these enhancements is to have checkboxes in the APEX Tree component. In this blogpost I will show you how to change the default folders to checkboxes. I will assume that you already have an APEX Tree on one of your pages, and that this one needs to be ammended to have checkboxes instead of folders.

19 July 2013

APEX: Tree Based on Multiple Tables

When you have a table with a hierarchical relation it is very easy to create a Tree component in APEX. Simply write the hierarchical query using START WITH and CONNECT BY and you're good to go. When you have a Master-Detail relation between two tables, and you want to show a Tree component you would have to make up the hierarchy yourself in order to use START WITH and CONNECT BY clause. In this blogpost I will show you how to create the query which you can use to create a Tree component with multiple tables.

11 July 2013

Reading the Oracle Documentation the Easy Way

Personally I don't like reading documentation from my computer, I prefer to have a "real" book. So when Oracle 12c came out I wanted to read the New Features guide and the Concepts guide again, but the fact that I would have to read it off my computer screen stopped me from really reading it... Skimming the topics was as best as it got.
Of course I could download the PDF's and read it off my e-reader, but I never got around to that.
Yesterday Jeroen Evers told me an easier way (and thus getting rid of all my lame excuses) to read the documentation. The tip was hiding in plain sight, but I never noticed it.
Navigate to the Oracle Documentation Library (link at the bottom of this post) and choose the guide that you want to read, but choose the HTML version of it.
On the top of the page on the right-hand side there are several options, like PDF, Mobi and epub.

From my iPad I chose epub and the guide will be placed in iBooks, making it a lot easier to read:

Links

All the Oracle Documentation
Oracle 12c Documentation Library

16 February 2013

APEX: Using the Application Date Format Mask

In your APEX application, you can define several default format mask to be used throughout the application, such as the Application Date Format or the Application Date Time Format. This eliminates the need to specify the format mask for each Date Picker item that you use. It helps in keeping the application at least consistent regarding the format mask used.

When you want to do some validation in your forms using the Dates entered by the enduser, you might have a need for the Application Date Format.
So instead of hard coding (using the same format mask as you entered):
to_date (:P1_DATE_PICKER, 'dd-mm-yyyy')
write it using the built-in Application Date Format mask. Problem is.... the built-in for the Application Date Format Mask is not documented. Thanks to a prompt reply by Joel Kallman via Twitter, use the following built-in:
to_date (:P1_DATE_PICKER, :APP_NLS_DATE_FORMAT)

04 January 2013

APEX: Highlight a Record in Report - with Dynamic Action

Yesterday I wrote a blog on how you can highlight a record in a report. That blogpost can be found here. Learco Brizzi posted a comment on a different way of accomplishing the same thing. And there are probably a number of other possibilities to implement the same requirement. In this blogpost I want to show you how to do the same with a Dynamic Action. Why would you want to choose for a Dynamic Action? This is a more efficient way because you don't need to refresh the page or the region.

03 January 2013

APEX: Highlight a Record in Report

Yesterday I read a question which was posted as a reply to an earlier blogpost. The orginal blogpost was about how to make a Report Row clickable, instead of just the Edit column. The question was: "How do I keep the clicked row highlighted so I can keep it as context information?" To see a working example of the requirement, check out this sample page In this blogpost I will provide a step-by-step way of doing just that.

21 December 2012

APEX: Dynamic Action in Interactive Report

Yesterday I was showing a colleague how to use a Dynamic Action in an Interactive Report to do an update on the underlying table. To get this to work prior to APEX 4 you would need to write some javascript on the page as well as an Application Process. Mostly I used the method described by Roel Hartman a number of years ago.
Want to take a look at a demo first before the steps to take to make it work? It's right here.