A colleague who also works for Oracle Consulting has recently blogged about a very useful and not so well known feature of ApEx. BRANCH_TO_PAGE_ACCEPT is a special type of request value which basically allows you to branch to a page, passing in a page item value, skip the page rendering and goes straight to page processing.
After recently reading a post on Tom Kyte's blog I stumbled across an excellent resource which is quoted by another fellow reader of Tom's blog. The Oracle Co-operative FAQ was set-up by Jonathan Lewis and is an excellent resource for anyone who uses the Oracle Database on a daily basis as a developer, tuner or DBA.
If you have an HTML page containing only 1 Textbox, standard HTML / browser behavior is to allow the page to be submitted when entered is pressed.
Normally I don't have an issue with this but in APEX, no request value is picked up when the page is submitted this way. Consequently, you usually get an error implying there is no page to branch to as the page was submitted without a request value.
The solution to this problem is very simple.
Create a dummy textbox on the page and in the: HTML Form Element Attributes attribute, enter the following: style="display:none;"
APEX had three multi value selectors: check box, multi select and list manager. APEX 3.0 introduces a new multi value selector: the shuttle. An shuttle consists of two text areas with buttons between the the area's to move items back and forth. At the right side, the selection, there are buttons to change the order of the items in the right text area. All selectors are based on a list of values. Setting or getting values of these selectors can be done with colon separated strings i.e. 'Violet:Indigo:Blue'.
If like me you have written several PL/SQL procedures within your APEX app, you will have had to deal with the issue of error handling. As a general rule, I try to hide all Oracle Error Messages from the user and replace these with something more meaningful for example:
If a user breaks a unique key by trying to insert the same value twice, the following error message is not uncommon:
In a recent application, we needed to model the Organisational Hierarchy which at its most complex ran to 7 levels deep. This was achieved using a self referencing foreign key (Pigs Ear) similar to that of the EMP table in the Scott schema. In essence, it simply stores the parent / child relationship for each entry in the Hierarchy.
This approach serviced the application very well in that a simply tree walk (CONNECT BY PRIOR) allowed us to construct the Hierarchical tree and bounce our requests off that.