You want a checkbox item on a page which is a preference, you want it to be remembered for the user across login sessions, but you don’t want the overhead of storing it in a database table. You might choose to store the value in a cookie instead. It may be lost (e.g. when the user clears their cookies or changes to a different browser or another computer), but we don’t mind – it’s just a preference.
I had built and was managing a web site that takes registrations from thousands of people around the state for a variety of sporting events. One of the goals of the site is to collect better quality data for the people running the events, i.e. they basically needed to get a better handle on how many people were actually attending.
One of the other goals of the site was to make it as easy and (more...)
This is an idea for an enhancement to the PL/SQL syntax.
If I have the following declaration:
I can do this:
INSERT INTO mytable VALUES in_record;
I can also do this:
UPDATE mytable SET ROW = in_record WHERE ...;
I can do this, as long as I list each and every column, in the right order:
INSERT INTO mytable VALUES in_record
RETURNING cola, colb, colc INTO out_record;
But I (more...)
Scott Wesley has started an excellent series of posts exploring the Early Adopter release of Apex 5.0.
I’m excited about the changes in 5.0 but have been too busy both at work and at home to look into it personally – so for now reading other people’s reviews has had to suffice. I’m looking forward to hopefully hearing more about it at AUSOUG later this year.
My advice is, have a look and (more...)
One of my clients reported an issue – they were seeing ”Waiting for 18.104.22.168″ and a blank screen when they tried to access the Apex web site I’d built for them. They were using Mozilla on a Windows PC, connecting via Vodaphone 3G – the problem was consistent, and it went away when they used their ADSL connection.
My initial response was “don’t use Vodaphone 3G” because the problem seemed to be outside of (more...)
Instead of calling a function, when you can get the same effect by accessing a documented PL/SQL variable, you should. For example:
v('APP_USER') = APEX_APPLICATION.g_user
v('REQUEST') = APEX_APPLICATION.g_request
v('APP_ID') = APEX_APPLICATION.g_flow_id
v('APP_PAGE_ID') = APEX_APPLICATION.g_flow_step_id
v('DEBUG') = APEX_APPLICATION.g_debug
g_debug is a boolean, unlike the
There’s more here: documentation for the APEX_APPLICATION package
I suspect that the implementation of
v() is something like this:
FUNCTION v (p_name IN (more...)
I decided to try using a wrapper procedure to isolate calls to APEX_UTIL.set_session_state in an autonomous transaction. I’m currently using it in a project and seeing how it goes in terms of performance.
DISCLAIMER: Don’t just throw this into your mission-critical system without at least testing it thoroughly first.
Since I had Morten Braten’s Alexandria library handy, I simply modified his APEX_UTIL_PKG. If you’re not using this library you can create your own wrapper (more...)
When should you commit or rollback a transaction? As late as possible, I would have thought, based on most of the advice in the Oracle world. You certainly want this to be predictable and consistent, at least.
Unfortunately, if you use
APEX_UTIL.set_session_state in your PL/SQL process, the result is not so predictable.
Thanks to Martin D’Souza who alerted me to this. I love learning new things, but occasionally you get a bad surprise like (more...)
I recently saw this approach used in a complex Apex application built for my current client, and I liked what I saw – so I used a similar one in another project of mine, with good results.
- Pages load and process faster
- Less PL/SQL compilation at runtime
- Code is more maintainable and reusable
- Database object dependency analysis is much more reliable
- Apex application export files are smaller – faster to deploy
- Apex pages can be (more...)
Get it? “an item with many hats”… yeah ok.
Need to change the label of an item on-the-fly? When I run my Apex page it renders item labels like this:
If the label needs to change based on another item, I could set the label with the value of another item, e.g. “&P1_CONTACT_NUMBER_LABEL.” and when the page is refreshed it would pick up the new label. But at (more...)