Oracle APEX 3.1 is here

Written by Paulo Vale on Friday, February 29, 2008

Finaly... the waiting is over :) and now we can integrate the stunning new features in our applications.

Oracle APEX 3.1 is now available to download. Just follow the link: http://www.oracle.com/technology/products/database/application_express/index.html.

And if you've been in the moon in the last weeks please take a look to the new great features.

Navigate to previous page

Written by Paulo Vale on Sunday, February 17, 2008

When developing an application we must provide intuitive navigation. When a user enters a page and it's presented with "Cancel" button, clicking this button should redirect the user to the page he came from. To achieve this, we can create a branch referring a page number. However, fixing a page number isn´t the best solution because the origin page can be variable.

I've tested some solutions using javascript:history.back() or decoding the referrer url using owa_util.get_cgi_env('HTTP_REFERER') among others, but ended with a self made solution. This solution consists in having an PL/SQL application process executed "On Load Before "Body" Region(s)" updating an application item wich stores the last page visited by the user.

So let me elaborate, step by step:

1- Create two application items.

2- Create a PL/SQL application process.

Code:



3- Go to you page and edit the branch linked to the CANCEL or SUBMIT button.


That´s it. Please feel free to comment or add an alternative solution.

Reset region pagination via URL

Written by Paulo Vale on Monday, January 28, 2008

As you probably know :) you can create links between pages in your application using the following syntax:

f?p=App:Page:Session:Request:Debug:ClearCache:itemNames: itemValues:PrinterFriendly

The ClearCache argument sets the value of items to null. Here you can specify items, pages or even entire application to clear the cached value. There is another thing you can do: the keyword RP resets region pagination on the requested page.

Javascript Tooltip Integration

Written by Paulo Vale on Tuesday, January 08, 2008

As I've said in my previous post, there is another interesting project for handling tooltips, the BoxOver Tooltips from the same author of the calendar script.





It is a small javascript that you can integrate with you APEX applications. It is very simple to use and has powerful customizations possibilities like using your own CSS to change the look and feel. You can even include pictures in your tooltips. Go to the project page for nice examples and howtos. Click here to see it working with APEX.



To install the script, download the latest version of BoxOver tooltips and copy the boxover.js script into a filesystem directory or just upload it as a static file under Shared Components. Include the following somewhere in the HTML of your page (Header section of you page or directely in page template if you want the tooltip feature available in all application pages). Substitute the path of the file accordingly making sure it points to the correct location of the boxover.js file.





Now you can use this feature just by calling it in an appropriated place. A simple example, using a Text Field is adding the following tag to "HTML Form Element Attributes" property :

TITLE="header=[Date] body=[Click here to pick a date]";
BoxOver is configured through the "title" attribute of HTML elements. This means you can use it in all your HTML objects. Works in all latest browsers incl. IE 6, IE 5, Mozilla 1.4+, FireFox 0.9.3 Opera 7.

Javascript Calendar Integration

Written by Paulo Vale on Monday, January 07, 2008

One of the good things about APEX is that we're not limited to the buit-in features. There are hundreds of examples of free code you can find with the help of Mr. Google :)

Today I'll show one of these examples. A small javascript calendar that you can integrate in you APEX applications. Click here to see it working.


I've found this simple but great small javascript calendar at http://calendar.swazz.org/ . Click here to download the latest version.

To install the script:

1- Copy the calendar.js script into a filesystem directory or just upload it as a static file under Shared Components.

2- Include the following somewhere in the HTML of your page (Header section of you page or directely in page template if you want the calendar available in all application pages). Substitute the path of the file accordingly making sure it points to the correct location of the calendar.js file.



3. Create a Text Item in your page and open the item properties page. Add to the the code:
onfocus="this.select();lcs(this)"
onclick="event.cancelBubble=true;this.select();lcs(this)"

4. Run the page and click the Text Item.

There is another interesting project for tooltips from the same author of the calendar script. If I manage some free time i'll blog about it later.