Browsing "Older Posts"

APEX "Display as Text" items with border and background-color

Von Tobias Arnhold → 10.26.2008
I don't know if you have noticed it yet. But the behavior of "Text Field (Disabled, save state)" items show up different from Firefox to IE or Opera. In Firefox (what I think looks much more standard like) the background color of the item value is gray and in all other browsers its white.

I couldn't find any solution for this item type. But I found another way to let a value look gray in all browsers using the
"Display as Text" item.

How to:
Create item as: "Display as Text (saves state)"
Edit item > Element > Element Table Cell Attributes
style="border: 1px solid rgb(204, 204, 204); width: 80px; background-color: rgb(225, 225, 225); padding: 2px;"
To see in an example app:

Here are the different browser views (more or less adjust to FF3):

Internet Explorer 7:
Opera 9.51:
Internet Explorer 6 (with MultipleIE):
Firefox 3:

It's crazy how different such small details can be...
APEX-AT-WORK no image

APEX Interactive Reports with dynamic filters

Von Tobias Arnhold → 10.20.2008
A couple of days ago I worked with dynamic filters in Interactive Reports (In my case: filters which get created at the page start). I used them in pop up pages to show up just a couple of rows depending on the clicked value.

I created an example:

I must say I couldn't fix that problem myself but with the terrific APEX community I found a solution.
Look at the whole entry: Set Interactive Report in popup with start search value and submit
Thanks again to Andy who made this useful tip possible.

How to do it?
In your pop up site where your Interactive report is go
Home>Application Builder>Application 28737>Page 5>Edit Page> HTML Header
and add this javascript.

<script language="JavaScript" type="text/javascript">

function set_ir_search_val() {
var v_stop_js = document.getElementById('P5_STOP_JS');
if (v_stop_js.value != 1) {
var v_page = 'P4_SELECT';
var v_from = opener.document.getElementById(v_page);
var v_to = document.getElementById('apexir_SEARCH');
v_to.value = v_from.value;
v_stop_js.value = 1;'SEARCH');


Now go Home>Application Builder>Application 28737>Page 5>Edit Region> Region Footer
and add this script:

<script language="JavaScript" type="text/javascript">

Finally you need to create a hidden item, in my case: P5_STOP_JS.

I think when you use Interactive Reports a lot then this tip can be really useful for you.

Oracle SQL Developer Data Modeling database re-engineering with APEX features

Von Tobias Arnhold → 10.13.2008
I tried a bit around with the new Oracle SQL Developer Data Modeling. First I tried to get it to run on my USB stick without the included JRE.
After it started I used some APEX features to re-engineer a database model.

How to (tested on Windows XP):
1. Download the software and extract/install it
Download from: Oracle_Download_Page
If you use the usb stick copy it to: %YOUR_USB_DRIVE%\PortableApps\ORACLE\oracle_data_modeller

PStart (if you want to use your OSDM from an USB stick in a comfortable way)
Download from

2. Get the new OSDM to run

Either you start it from your standard installation, for example

Or you create an own batch if you want to use it from an USB stick
REM Start osdm with nojre installed
REM (standalone from USB stick)

REM 1. set variables
REM 1.1 Path Variable

REM 1.2 ORACLE_HOME variable

REM 1.3 JAVA variable
set PATH=\PortableApps\RUNTIME\JRE\bin;%PATH%
set JAVA_HOME=\PortableApps\RUNTIME\JRE\bin

REM 1.4 TNS_ADMIN variable

REM 1.5 NLS_LANG Variable
REM set NLS_LANG=German_Germany.WE8MSWIN1252

REM 2. Connect app path
cd \PortableApps\ORACLE\oracle_data_modeller\bin

REM 3 Import java files into path variable
set cwdcp=..\conf
set cwdcp=%cwdcp%;..\lib\osdm.images.jar
set cwdcp=%cwdcp%;..\lib\osdm.exports.jar
REM this string you need to add
REM if you create it from the Linux script

set cwdcp=%cwdcp%;..\lib\osdm.imports.jar
set cwdcp=%cwdcp%;..\lib\osdm.sets.jar
set cwdcp=%cwdcp%;..\lib\osdm.model.jar
set cwdcp=%cwdcp%;..\lib\osdm.gui.jar
set cwdcp=%cwdcp%;..\lib\osdm.utils.jar
set cwdcp=%cwdcp%;..\lib\log4j.jar
set cwdcp=%cwdcp%;..\lib\lf\jlfgr.jar
set cwdcp=%cwdcp%;..\lib\poi\poi.jar
set cwdcp=%cwdcp%;..\lib\jimi\JimiProClasses.jar
set cwdcp=%cwdcp%;..\lib\jdbc\oracle\ojdbc5.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\awxml.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\olap_api.jar
set cwdcp=%cwdcp%;..\lib\oracleaw\xmlparserv2.jar
set cwdcp=%cwdcp%;..\lib\ohj\help4.jar
set cwdcp=%cwdcp%;..\lib\ohj\ohj-jewt.jar
set cwdcp=%cwdcp%;..\lib\ohj\oracle_ice.jar

REM 4. start application
java -Xmx1024M -Xms258M -classpath %cwdcp% oracle.dbtools.crest.swingui.ApplicationView

3. Create DDL with APEX

Go Home > Utilities > Generate DDL
Select your schema
Under "Object Type" click on "Check all" and Output to "Save As Script File"
Now click "Generate DDL" and give it a name like NEW_DDL_SCRIPT

Download your generated script: Home > SQL Workshop > SQL Scripts > Script Editor
Click on your script and download it as "NEW_DDL_SCRIPT.sql".

4. Integrate DDL
Start the OSDM (via batch or the osdm.exe)
File > Import > DDL File

Select your APEX generated DDL file
Select your database version, for example: Oracle Database 10g
Import runs and log-file will be generated

Oracle SQL Developer Data Modeling Version: 1.5.1 Build: 518

Data Modeling Import Log
Date and Time: 2008-10-13 15:50:26
Design Name: test
RDBMS: Oracle Database 10g

All Statements: 75
Imported Statements: 75
Failed Statements: 0
Not Recognized Statements: 0

The generated model looked really well and I can only hope that this tool will be free at the end of the development.

APEX radio group with dynamic help text

Von Tobias Arnhold → 10.12.2008
I came across a problem with help text information for the values of a radio group (LOV). I wanted to pop up help information when you move over the output items of the radio group.

To include this ability you have to a enhance your LOV query.

Go Edit Page Item > List of Values > List of values definition:

('<span style="cursor:help" title="' || product_description || '">'
|| PRODUCT_NAME || '</span>') as show_value,
PRODUCT_ID return_value
order by 1

It will look like:See it in action:

There are a couple of other resources about this topic available:
Completely different example how to show up some help (Just click on a red text title):