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:

class="tfCamp"

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>
<!--
init_htmlPPRReport('#REGION_ID#');

//-->
</script>
</htmldb:#REGION_ID#>
</div>

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.