Translating internal messages used by APEX

Written by Paulo Vale on Sunday, December 23, 2007

If you have APEX installed in a language different from the one you are using in you application then you surely have some untranslated messages.

Some examples (English version installed) are the "1 error has occurred" in validations, "Next" and "Previous" in pagination and "%0 days ago" using SINCE function.

The good news is that you can translate these messages.

Access Shared Components in your application, then click "Text Messages" under Globalization. Using "Create" button, add the messages to translate filling the options:

Name - Enter the name of each message that needs to be translated. See Table with the the list of possible values.
Language - Select the language for which the message would be used.
Text - Enter the text to be returned when the text message is called.

Search for "Translating Messages Used Internally by Application Express" in APEX help to get a more detailed information.

Still searching for a solution to the "Invalid credentials" message.

Colorful web forms

Written by Paulo Vale on Monday, December 17, 2007

Web forms can be beautified using style sheets. Colors, borders, cursors, text style and other style properties can be changed.

Here is an example. How to do it?

First you will need to add to your template CSS file the following script, or just past it under Page Properties > Header and Footer > Header Text:

You need to create a style for each item type. This example refers only to Text Items, however if you follow the link to test example, you also have examples to Select Lists and Text Areas items.

Now you can reference your style in the "HTML Form Element Attributes" section under the item properties (in this case for Text Fields) like this:


Note: This is 100% compatible with firefox. Internet Explorer unfortunately doesn't handle the hover and focus effect in form fields, all other functionalities work how expected.

Turn Report into PPR Report

Written by Paulo Vale on Monday, December 10, 2007

You can turn your reports into PPR (Partial Page Request) reports in an easy way, making little changes to your templates. Follow me...

1- Create or edit a report template.

2- Before rows section: add the following html before the open table tag.

<div id="report#REGION_ID#"><htmldb:#REGION_ID#>

3- After rows section: add the following html after the close table tag.
<script language=JavaScript type=text/javascript>


4- Pagination Subtemplate: modify Next Page Template, Previous Page Template, Next Set Template and Previous Set Template sections, changing this code...
<a href="#LINK#"

... by this one.
<a href="javascript:html_PPR_Report_Page(this,'#REGION_ID#','#LINK#')"

And it's done. You get a PPR (Partial Page Request) template. This trick can also be used to obtain a custom row based PPR report.

Oracle Application Express 3.1 Evaluation

Written by Paulo Vale on Thursday, November 22, 2007

Apex Team made available today the Oracle Application Express 3.1 Evaluation. Registrations are available here.

I've finished my request for a workspace minutes ago. Can't wait to put my hands in the new Interactive Report Regions. I hope they didn't forget to include a functionality to generate charts using this report regions.

Populate date field using javascript

Written by Paulo Vale on Thursday, November 15, 2007

In some date fields it's useful to have a quick link to populate with, for instance, todays date. See it here.

To accomplish that, first you can attach this javascript code to you page template.

Then you just need to add html code to call the function. The best place to put the code is in my opinion, the "Post element text" region of the field.

Now you can play around changing the date format and adding entries to days, weeks or months.

Check all checkboxes

Written by Paulo Vale on Wednesday, November 14, 2007

There is a nice site with lot of useful examples of apex javascript built in functions.

Specifically here you can find a simple example to check all checkboxes at once.

A nice way to integrate this in APEX is to create a checkbox item based on a list of values and in the "Post Element Text" have something like:

<a href="#" onClick="html_CheckAll('P22_MULTI',true);">All</a>
<a href="#" onClick="html_CheckAll('P22_MULTI',false);">None</a>

This will create two links. One to check all checkboxes and other to uncheck them all.

Enlarge shuttle item

Written by Paulo Vale on Friday, November 02, 2007

If you think the shuttle item doesn't have enough with then do the following.

Within the shuttle item, look for the property "HTML Form Element Attributes" and enter the following against it:

HTML Form Element Attributes: style="width:250px"

This should solve your problem.

I got this tip from Tony Fatouros in Oracle Apex Forum.

Wizard Progress List without the "Start" entry

Written by Paulo Vale on Friday, November 02, 2007

Some templates in APEX adds a "Start" entry in the Wizard Progress List.

For people like me who develops applications in other language than English (in my case Portuguese) this is not good.

Like other things in APEX this "issue" is simple to resolve. Just go to Edit List Template. Then remove from the "Before List Entry" region the html code:

<div class="noncurrent"> Start</div>

And it's done!

Report columns that don't wrap

Written by Paulo Vale on Saturday, September 29, 2007

Have you ever had a tabular report where in an unwanted way a column breaks into two lines? That break can turn a nice report into an ugly unreadable report. For instance a date column with the day and month in the first line and the year in the second line. Bad, right?

There are several ways to avoid this, but simpler is adding "white-space: nowrap" to the CSS Style in the report column formating, like you can see in the picture.

Image Hosted by

Apex: the near future

Written by Paulo Vale on Saturday, September 22, 2007

In the next weeks Apex will have an upgrade (3.1) and a new version (4.0) is just around the corner. In the newly published Apex Statement of Direction, are some clues that I've also seen in this Michael Hichwa document I found at Dietmar Aust Blog.
From the new functionalities expected for the 3.1 upgrade, I am very curious about the "PL/SQL API to manage a runtime installation of Application Express".

But the best is reserved to the 4.0 version. New promised and amazing features will be available as we can see in the recently published Carl Backstrom Apex 4.0 preview video. The new query report region using Ajax is just fabulous. The tabular form validations, one of the most wanted features asked in Oracle Apex Forums will also be available in this version.
I'm glad to see that Apex Team is still motivated to bring Apex to a higher level. As I said, new announced functionalities are just amazing and yet, more to come. Can't wait to get my hands into the 4.0 version.

Substitution string and SQL Developer

Written by Paulo Vale on Friday, September 21, 2007

I use a substitution string in my applications to set the system path to my images. I call it MYFILES. Sometimes I create procedures and functions referring this substitution string to generate HTML code like this example:

IMG SRC="&MYFILES.image.gif"

Today I was trying to create a procedure in SQL Developer (another Oracle great tool) using that substitution string, but I got a problem with & character because its presence was interpreted as a substitution variable. I've noticed that SQL Developer even when the '&' is in a comment it is being interpreted as a substitution variable.
The solution to bypass this problem was using this simple command at the top of the code:


Here you can see that this command is considered obsolete and it was substituted by the SET DEFINE command. Worked for me.

The time has come...

Written by Paulo Vale on Friday, September 21, 2007

Hi, my name is Paulo Vale. I'm co-founder and development director at neoface, a portuguese software company. Neoface is an Oracle partner since 2005.
In this blog I will try to expose some of the experience I have in Oracle Apex. I started developing web applications using this Oracle tool about two years ago. I've learned very much reading some good Apex Blogs out there, so maybe it's time for me to contribute.
The time as come for me to have a blog :)