Skip to main content

Posts

Showing posts from September, 2009

Getting rid of the annoying popup help

Recently I stumbled upon two excellent blog posts about how to change the default pop up APEX Help functionality to something more user friendly. Martin explained how to transform the Help into a tooltip, while Piotr transformed the Help pop up into a DIV. I will add my two cents to this discussion by adding another option... The pop up is trigger by a call to the Javascript function "popupFieldHelp'. So I decided to locally overwrite that function with this one: function popupFieldHelp(pItemId, pSessionId ){ // Construct the URL vURL = "wwv_flow_item_help.show_help?p_item_id=" + pItemId + "&p_session=" + pSessionId; // Call getRequest to get the HTML for the popupWindow var popupWindow = getRequest(vURL); // Get the Subject (item name) from the Window var HelpSubject = $(popupWindow).find('.fieldtitlebold').html(); // Get the HelpText from the Window var HelpText = $(popupWindow).find('.instructiontext').html(); // S

Running APEX on 11gR2 using Sun's (Oracle's?) VirtualBox

Today I decided that I needed an environment to play with the latest and greatest Oracle RDBMS : 11gR2. This version is only available for Unix platforms, so I needed a virtual environment to get that working on my laptop - running on XP. You can pick any kind of virtualization software, but, due to the recent take-over of Sun by Oracle, I decided to go for what's currently known as Sun's VirtualBox. I guess this product will re-branded to Oracle's VirtualBox somewhere soon. So what are the steps: 1. Download VirtualBox from http://www.virtualbox.org/ and run the installer. 2. Start VirtualBox, click 'New' and enter a Name, Operating and Version for the Virtual machine. This is gonna be a 100% Oracle thing, so I installed Oracle Enterprise Linux (OEL). 3. Oracle 11gR2 needs 1Gb of RAM, so set the memory size to 1024 - you can change this afterwards. 4. Create a new boot harddisk with dynamically expanding storage . 5. On the next page you have to set the 'si

Easy Show/Hide items in a Form

For showing and hiding information in a Form you can use a default "Show and Hide Region". But what to do if you want to show/hide some details within a region? The answer is: with a Label Template, some cool jQuery UI stuff and "Stop and Start HTML Table" Items. 1. Create a new Label Template (From Scratch) for Template Class 'No Label'. Call it 'Show/Hide Next Image' or something else you fancy. 2. Edit the Label Template you've just created. Remove everything that's there by default. 3. Set the 'Before Label' to : <img src="wwv_flow_file_mgr.get_file?p_security_group_id=<your workspace id>&p_fname= 4. Set the 'After Label' to : " onload="$(this).next().hide();" onclick="$(this).next().toggle('blind');"> 5. Now create a "Stop and Start HTML Table" Item just before the items you want to show/hide. Edit that Item and set the label property to the name of the imag

Transform ORA-xxxx messages into something more user friendly in APEX

When you delete a record that is referenced using a foreign key constraint you get a rather ugly error like this: Of course you can prevent such a thing from happening by creating a Page process that checks if your delete is "Ok". But that's double coding...and dangerous when you have to maintain your database structure: You'll probably forget to update the processes as well. Wouldn't it be nice if you can 'catch' that error an present it to the end user in a more friendly way (and with a somewhat more understandable text)? I guess your users will be more enthusiastic about your application (and you) when you show them something like this: So how do we achieve that? 1. Edit the "Error Page Template Control" region of your Application Default Page Template, because that's the one that is used for presenting errors. Set it to : <script type="text/javascript">$(document).ready(function(){raiseErrorHandler();});</script>

Blackbird : Javascript logging 2.0

When debugging your APEX Javascript stuff you probably use Firefox with Firebug. By writing messages to the console, you can follow the flow of your Javascript. Incidentally you use - annoying - alerts in your code to find out where you messed up your code. But recently I stumbled upon BlackBird! With blackbird you can write different types of messages, like info, warning and error messages, to a little console window, that looks a bit like a Twitter client. You can show/hide the window using F2. In this little window you can toggle the type of messages you're interested in. And it works even on IE! Blackbird consists just of 1 CSS, 1 JS and two image files, so it is very easy to install. Just a little tip, rename the namespace from 'log' to something like 'bb', to avoid conflicts with the Firebug log. You can find the code, demo and docs on http://www.gscottolson.com/blackbirdjs/ .

OOW 2009 Blogger Meetup

All you bloggers out there visiting Oracle Open World this year, let's get together at the traditional annual Blogger Meetup . This time the organizer is Pythian's Alex Gorbachev . Thank you Alex!!

Wondering what an Oracle ACE Award looks like?

I (finally) received the actual award (thanks to Lillian and Justin)!