Monthly Archives: April 2012

JQuery Cluetip APEX implementation

I love a website that uses tooltips and cluetips well. They’re a great way to provide additional information to a user without cluttering up the page, and of course, they also look really cool. :-)

My first stop, as always, when wanting to add a ‘cool’ feature to an APEX app, is the APEX Community-based plugin repository. A quick search for Tooltip and Cluetip yielded one I have recently been using in most of my apps: a Tooltip Dynamic Action Plugin, whose content can be retrieved via a number of methods, including PL/SQL. I use this one to display tooltip help for my application items, pretty much exactly as the instructions say on the demo page. Works great, why reinvent the wheel!

But what if you have a great APEX region on your page that you decide would best be implemented as a Tooltip/Cluetip. This could be a Report Region, a Form Region, a Dynamic PL/SQL region, or even a Chart Region. You’ve already done the work implementing it on your page, and it is certainly quicker than coding a new PL/SQL procedure to render it as a tooltip.

I visited the JQuery Cluetip Plugin page, and scanned the demo page for something interesting to use. One of them uses local content from a hidden <div> element, which struck me as a good candidate for my requirements. I downloaded the source, and set to work, referring back to a presentation I saw a couple of years ago on the Sumneva site.

Step 1: Jquery includes

You can […]

By |April 28th, 2012|APEX, JQuery, Plugin|0 Comments

APEX Clickable Progress Wizard with Automatic Saving

I was recently asked to implement a fairly large and complicated form in APEX. Rather than displaying something long and scary to users on a single page, we decided to break it out into sections on different pages, and use a Sidebar Navigation Region that would show the user which section he/she was currently filling out, and where in the process he/she was, as in the example below. By the way, this also happened to be the same form in which I implemented a simple yet powerful workflow using Dynamic PL/SQL.

We decided to use the Progress Wizard List Template, and with that, we were pretty much 80% of the way there. Gotta love APEX! We just needed to make a few small tweaks.

 1.We wanted the user to be able to navigate to a specific section of the form by clicking on the relevant sidebar link on the left. This meant branching to a different page.

2. We also wanted to trigger an automatic save (SUBMIT) of the form when he/she clicked on the relevant sidebar entry, without having to click on the ‘Save’ button.

By default, the template simply displays where the user is at in the process, but does not include hyperlinks nor does it submit the page.
Submitting the page is easy enough,however, I somehow needed to be able to tell the ‘After Processing’ Branch which page to branch to, based on which Step the user clicked on.
Here is what I did:

1. Created a Page 0
2. Added the following (hidden) item to Page 0: P0_BRANCH_PAGE
3. Added an After Submit branch to each of the pages involved in the workflow, […]

By |April 27th, 2012|APEX|9 Comments

Simple workflow implementation in APEX

A client of mine wanted me to build an online form using Oracle APEX that, while fairly simple in design, had a fairly complicated workflow associated with it.

Each document had to flow through many different approval levels, and at each point, the possible actions a user could take would differ.

At first glance I thought I’d just manually create a lot of different buttons on the page and use various authorization schemes to display or hide them depending on document status and user role. I did not look forward to this task, considered the likeliness of the workflow changing (high!), and thought there must be a better way.

What I ended up doing was translating the workflow into table form based on the current document status.

TBL_STATUS_WORKFLOW

ID number;
CURRENT_STATUS number;
NEXT_POSSIBLE_STATUS number;

Both CURRENT_STATUS and NEXT_POSSIBLE_STATUS are foreign keys to a TBL_STATUS table, that looks like this:

TBL_STATUS

STATUS_ID number;
STATUS_DESCRIPTION varchar2;
BUTTON_REQUEST varchar2;
BUTTON_LABEL varchar2;

Say, for example, my document is in DRAFT mode (status). My workflow says that a document that is still in ‘Draft’ can go either to ‘Submitted to Level 1′ status or ‘Withdrawn’. Ideally, at this point, I would like to display 2 buttons to my user: ‘Submit to Level 1′ that would trigger a status change and email to appropriate party, and ‘Withdraw’, which would also trigger a status change.

My tables look something like this (small sample only):

TBL_STATUS

STATUS_ID STATUS_DESCRIPTION BUTTON_REQUEST BUTTON_LABEL
1 Draft
2 Submitted to Level 1 SUBMIT_LVL_1 Submit to Level 1
3 Withdrawn WITHDRAW Withdraw
4 Submitted to Level 2 SUBMIT_LVL_2 Submit to Level 2
5 Returned for revisions RETURN_REV Return for Revisions

To translate my workflow and indicate that the document can move from Draft to either Submitted to Level 1 […]

By |April 20th, 2012|APEX|7 Comments

There’s a plug-in for that!

I’ve been working with APEX since 2004, and have used most versions since HTMLDB 1.6. The use of plug-ins since version 4  is definitely very high on my list of favorite new features.

I’m a frequent visitor of the community-based APEX plugin repository, and rarely do I roll out a new client app anymore without including at least one plug-in. The SkillBuilders Modal Page is a personal favorite, and I have used it countless times. For phone number fields, I really like the Text Field with Masked Input. One of my pet peeves is a website that asks for a phone number, or postal code (Canadian’s postal codes are sometimes input as XXX-XXX, XXXXXX or even XXX XXX), without providing an input mask. Drives me bananas!!! Seriously, guys (and gals, of course!), take the extra time to program an input form that won’t bug out because the user can’t guess how you want to see the postal code… But I digress.

ODTUG is holding its first ever world wide APEX Plug-ins competition! Now I won’t lie and say I will be participating, I am more of a plug-in ‘consumer’ than ‘creator’, but I eagerly await the results. So here is is your opportunity to write an APEX plug-in and have it viewed by the entire international APEX competition. The winner will be crowned 2012 ODTUG APEX Plug-in Developer of the Year, and there are some great prizes to be won.

Have a plug-in you’ve been playing with, incubating, maybe a bit reluctant to release out into the wild, APEX world? Here’s your chance!

Visit the ODTUG Application Express Competition page now, for more information about how to register. I […]

By |April 12th, 2012|APEX|1 Comment