Inside Oracle APEX by Patrick Wolf

17 Reasons why you shouldn't miss ODTUG Kaleidoscope this year!

The agenda of the ODTUG Kaleidoscope 2008 conference has just been released and it looks like that Oracle Application Express (APEX) has a massive presence at this conference.

On Sunday there is a full day symposium about The Seasoning of Application Express – Must Hear Success Stories and during the conference there are counted 17 presentations regarding Oracle APEX.

I compiled a list of them and what I have read in the abstracts, they look really promising, but see for yourself.
  • Building the New Stuff: AJAX, JSON, and APEX 3.1 by Carl Backstrom
  • Advanced Oracle Application Express Tips and Techniques by Bradley Brown
  • APEX Cheat Sheet 3 by Karen Cannell
  • Creating Advanced Charts in Oracle Application Express by Dimitri Gielis
  • APEX Versus ADF by Dimitri Gielis and Peter Ebell
  • APEX Development: Watch It Live by Bill Holtzman
  • Creating Dynamite Applications that Deliver by Kathy Hunsicker
  • Explore and Benefit the APEX Repository by Michiel Jonkers
  • Go Global with Oracle Application Express! By Joel Kallman
  • Migrating from Access to Oracle Application Express by Josh Millinger
  • How to Hack an Oracle Application Express Application by Anton Nielsen
  • Oracle Application Express (APEX) Version 3.1 by David Peake
  • Application Express in Support of Institutional Strategic Planning by Tanya Podchiyska
  • APEX Hints, Tips and Best Practices by John Scott
  • You Can't Do THAT in a Browser! Extending Oracle APEX with Third Party Components by Scott Spendolini
  • Use the Power of APEX Dictionary Views to Increase the Quality of Your APEX Applications by Karen Van Hellemont and Jan Huyzentruyt
  • Increase Your Oracle APEX Development Productivity with Open Source Tools by Patrick Wolf
  • Application Express from a Forms Developer's Perspective by Andrew Woodward
Check out the agenda for more details.

Two of the presentations deal with the Oracle APEX Repository and I'm looking forward what they are coming up with, because I'm heavily using it in the ApexLib Framework and did myself a presentation last year in Germany covering that topic.

If you are interested in Oracle APEX, then you shouldn't miss this conference! And by the way, it's in New Orleans...

Labels: , , ,


« ... Read full posting ... »

Integrating a Slider Control into Oracle APEX

Oracle Application Express (APEX) doesn't come with a built-in Slider Control widget, but it's quite easy to integrate one of the existing Javascript libraries like the Tigra Slider Control. See there example page 1 and page 2 for how the sliders can look like. But you can also use your own images for the slider.

What are the steps to integrate it?

  1. Copy the slider.js onto your web server or upload it into Shared Components\Static Files
  2. Upload the images you want to use for the slider onto your web server or into Shared Components\Images. In my case it's sldr5h_bg.gif and sldr5h_sl.gif
  3. Add the following code into Edit Page Attributes\HTML Header
    <script type="text/javascript" src="#APP_IMAGES#slider.js"></script>
    Note: Replace #APP_IMAGES# if you didn't upload the files to the Shared components. If you didn't assign the files to the application, use #WORKSPACE_IMAGES# instead.
  4. Create a text item on your page. For example named P1_VALUE
  5. Set the HTML Form Element Attributes property to
    onchange="A_SLIDERS[0].f_setValue(this.value);"
  6. Set the Pre Element Text property to
    <table><tr><td>
  7. Add the following code
    </td><td>
    <script type="text/javascript">
    (function(){
    var A_Slider = {
    'b_vertical' : false,
    'b_watch': true,
    'n_controlWidth': 149,
    'n_controlHeight': 17,
    'n_sliderWidth': 9,
    'n_sliderHeight': 17,
    'n_pathLeft' : 1,
    'n_pathTop' : 0,
    'n_pathLength' : 138,
    's_imgControl': '#APP_IMAGES#sldr5h_bg.gif',
    's_imgSlider': '#APP_IMAGES#sldr5h_sl.gif',
    'n_zIndex': 1
    }
    var A_SliderInit = {
    's_form' : 0,
    's_name': 'P1_VALUE',
    'n_minValue' : 1,
    'n_maxValue' : 18,
    'n_step' : 1
    }
    new slider(A_SliderInit, A_Slider);
    })();
    </script>
    </td></tr></table>
    into the Post Element Text property and replace the red marked code parts. See the documentation for the different settings.
That's it, you are already done! It's now time to run your page to try it out.

See my example slider application for a working example.

Update on 26-Jan-2008: I have changed the original example to use just one field. That's better, because in the original example which used a second field with the Begin On New Line set to No, it could result in a detached slider if there are other fields which also use Begin On New Line=No. I'm now wrapping a table around both elements (text field and slider) to tight them together.

Labels: , , ,


« ... Read full posting ... »

This blog has moved!

Maybe you have already noticed that my Inside Oracle APEX blog isn't hosted anymore at inside-apex.blogspot.com, instead it now has it's own domain www.inside-oracle-apex.com!!!

I thought it was time to get my own domain and move my blog to a blogging software where I have more control on how the content is displayed and where I have access to the database. :-) The current blog is still powered by Blogger, but I'm building up a Wordpress installation in the background. Stay tuned for updates in the coming weeks.

If you have linked my blog, I kindly ask you to update your link. Thanks a lot!
BTW, I'm always happy to get some fans at Technorati :-) Add this blog to my Technorati Favorites!

« ... Read full posting ... »

Should you consider Apache 2.0 for an Oracle APEX installation?

Just read a very interesting posting by Joel Kallman, titled Oracle HTTP Server, Apache 2.0 and connection pooling. Before Oracle 11g, mod_plsql was just available for Apache 1.3 which had one big drawback on Unix systems. Apache 1.3 just supports a process model which prevents that mod_plsql can really take use of a database connection pool, because each process has his own "dedicated" database session which can't be shared across process bounders.

That's different to Apache on Windows which uses a thread model and allows to share the database connections between the threads. Apache 2.0 has been enhanced to support a thread model on Unix too. Check out Joel's posting for further details. In my opinion that are good news for Oracle APEX running on a Unix based Apache, because that should normally decrease the number of database sessions in your database.

BTW, I like to welcome Joel in the Oracle APEX blogging community!

He told me during OOW that he had started a blog some time ago, but actually nobody knows about it (also not his team) and I had to be quit until someone discovers him. Or at least that's what I remember from a long evening in the pubs... :-)

But today he had his public "outing" by being added to OraNA, so it's my time to introduce his blog to the Oracle APEX community. If you don't know Joel, he is the Software Development Manager for Oracle APEX. Give him a warm welcome!

BTW, Joel you had a quite good start this year, much better than last year. :-) Keep up posting!

Labels: , , ,


« ... Read full posting ... »

Oracle APEX Page Template Position Preview

On Friday I had to do some work on an Oracle Application Express (APEX) application of a client which I did some time ago. I had to create a new region next to an existing region on a page which had already several other regions on it. Normally no big problem, you would just use the "Column" property of the region and you are done. To make it short, it didn't work because of the layout of the template and the existing regions which are already using the "Column" property.

So I had to work with the "Display Point" property of the region, to "reset/close" the HTML table of the previous regions and start with a new fresh HTML table which has it's own cells/columns, ... But what is the best "Display Point", especially if you are not that familiar with your page template position placeholders anymore?

Do I have to open the page template definition and check out the HTML code of the template and look for the #REGION_POSITION_XX# placeholders? No you don't have to!

On Friday I re-discovered a nice little feature of Oracle APEX which I'm pretty sure I have already seen when first looking at Oracle APEX, but which I totally forgot about. Every clicked on the "Flashlight" next to the "Display Point" select list? It shows you a rendered preview of your page template with the position of the different "Display Points" in your template. A nice feature!


There are so many useful little features built into the Oracle APEX Builder we are most time not aware of during our daily development work. Especially if you are working for a longer time with a tool, you think you know it and you are not that curios anymore to try out and search for features not yet used. But there are some many useful features built in which are sometimes a little bit hidden. I already wrote about some of them, like
to just name a few of them.

Do you know other nice features which are not used that often? Share your Oracle APEX Builder tips and tricks!

Labels: , , ,


« ... Read full posting ... »

ODTUG Kaleidoscope '08 - Abstract Accepted

Just received a notification mail that my presentation titled

Increase Your Oracle APEX Development Productivity with Open Source Tools

has been accepted for the ODTUG Kaleidoscope 2008 conference.

The order of the mails I got from ODTUG was quite interesting.

Yesterday I got the "THE BIG EASY BULLETIN: Abstracts Selected" info mail, which I assume was sent out to all members of ODTUG and participants of the last conference. I was really surprised that I was featured as a speaker next to the big names in the Oracle community like Duncan Mills, Mark Rittman, Tom Kyte, Peter Koletzke, John Scott, Dimitri Gielis, Paul Dorsey and Steven Feuerstein.

And a few hours ago I got the "Invitation to Speak at ODTUG Kaleidoscope 2008" notification mail that I have been accepted as a speaker. :-)

Looking forward to see you in New Orleans!

Labels: , , ,


« ... Read full posting ... »

Add Double Click to Oracle APEX Shuttle Widget

Do you want to improve the usability of the Oracle APEX Shuttle Widget a little bit?

Let's enhance it by adding support for double click. It will allow users to double click on an entry in one of the two lists of the shuttle, to move the selected entry to the other list as they would normally do with the corresponding icons. I think that's a little bit more convenient and faster than using the icons.

There comes the necessary code.
  1. Create a Page Item of type "Shuttle"
  2. Add the following code into the "Post Element Text" property of that page item.
    <script type="text/javascript">
    (function(){
    var vName = "#CURRENT_FORM_ELEMENT#".substr(2);
    $x("#CURRENT_ITEM_NAME#").ondblclick = new Function("g_Shuttlep_"+vName+".remove();");
    $x("#CURRENT_ITEM_NAME#_2").ondblclick = new Function("g_Shuttlep_"+vName+".move();");
    })();
    </script>
  3. That's it, you are done. Quite simple and easy, isn't it?
I already tried to influence Carl a little bit to add that small little feature to Oracle APEX 3.1, let's see if I was successful :-)

Labels: , , ,


« ... Read full posting ... »

Warning: DBMS_LDAP.simple_bind_s/APEX_LDAP.authenticate and NULL password

Just came across a very strange behavior of the DBMS_LDAP.simple_bind_s and APEX_LDAP.authenticate procedure which I used to do a basic LDAP authentication against our MS Active Directory server.

I used the following simple test code
DECLARE
vSession DBMS_LDAP.session;
vResult PLS_INTEGER;
BEGIN
DBMS_LDAP.use_exception := TRUE;
vSession := DBMS_LDAP.init
( hostname => 'your-active-directory-server'
, portnum => 389
);
vResult := DBMS_LDAP.simple_bind_s
( ld => vSession
, dn => 'CN=Wolf Patrick,[...rest of the DN...],DC=sphinx,DC=co,DC=at'
, passwd => 'x'
);
DBMS_Output.put_line('User authenticated!');
vResult := DBMS_LDAP.unbind_s(vSession);
END;
which raised the expected error

ORA-31202: DBMS_LDAP: LDAP client/server error: Invalid credentials. 80090308:
LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, data 52e, vece
because of the wrong password. But as soon as I set NULL for the passwd parameter I got the "User authenticated!" message!!!
Couldn't believe that, so I also tried the APEX_LDAP wrapper package. Shows the same behavior with the following code!
BEGIN
IF APEX_LDAP.authenticate
( p_username => 'Wolf Patrick'
, p_password => NULL
, p_search_base => '[...rest of the DN...],DC=sphinx,DC=co,DC=at'
, p_host => 'your-active-directory-server'
, p_port => 389
)
THEN
DBMS_Output.put_line('ok');
ELSE
DBMS_Output.put_line('not ok');
END IF;
END;
So I did a final test with the built-in LDAP authentication scheme of Oracle APEX. The good news is that it captures this case and you are not able to login. So it looks like they are doing an extra check for a NULL password there.

But what does that mean?!?

  1. I'm a total moron and did something completely wrong. In that case please let me know!
  2. Our MS Active Directory server is set up wrong to accept NULL passwords for LDAP connections.
  3. MS Active Directory is a total piece of crap to accept NULL passwords. (BTW, I don't know if other LDAP servers like Oracle OID show the same behavior)
  4. All applications which are using APEX_LDAP.authenticate or DBMS_LDAP.simple_bind_s in a custom authentication scheme have a huge security flaw in them.
Can someone test the above code against his MS Active Directory or some other LDAP server and let me know?

BTW, in my opinion APEX_LDAP.authenticate should behave the same as the built-in LDAP authentication scheme and return FALSE.

Update as of 13-Jan-2008: John Scott pointed into the right direction. DBMS_LDAP.simple_bind_s has to accept a NULL password, because this function is also used to authenticate against a LDAP server if you want to do an anonymous search in the LDAP directory. I think it wasn't the best decision by the authors of the RFC 4513 to reuse the password parameter to decide if it's an anonymous bind or not. An extra parameter would have been much better an clearer. Anyway, we have to deal with that problem now.

If you directly use DBMS_LDAP.simple_bind_s for authentication in your code, don't forget to do a password IS NOT NULL check. If you use APEX_LDAP.authenticate you have to do the same.

But I have good news! APEX_LDAP.authenticate will be fixed in Oracle APEX 3.1 to include this check. Thanks to the APEX team!

Labels: , , ,


« ... Read full posting ... »

Advanced Oracle APEX training in Germany

The following post is in German, since it is targeted towards the German speaking community in Europe.

Auf der Suche nach einem wirklich guten Oracle Application Express (APEX) Training, welches nicht von einem Trainer gehalten wir welcher nur das Skript kennt und von Oracle APEX eigentlich nicht viel Ahnung hat?

Dann müsst Ihr nicht mehr weitersuchen, den gemeinsam mit dem Dietmar Aust und dem Denes Kubicek (auch bekannt für seine tolle und umfangreiche Oracle APEX Beispielapplikation) veranstalten ich den Workshop

Oracle APEX: Fortgeschrittene Techniken aus der Praxis


Oracle APEX: Fortgeschrittene Techniken aus der Praxis
Agenda und weitere Details findet Ihr auf der Web-Site wo Ihr Euch auch anmelden könnt.

Würde mich freuen Euch dort zu sehen!

Labels: ,


« ... Read full posting ... »

Oracle APEX 3.1 Eval Instance refreshed!

If you have already registered for the Oracle APEX 3.1 beta program you should already have received a mail that informed you that the evaluation instance has been updated with a new version from development.

Beside a lot of fixes to the new Interactive Report Regions, some of the icons in the Builder got a face lifting as Dimitri had already noticed.

BTW, I just noticed a nice little new feature in the Interactive Report Regions. It's now possible to collapse the criteria header which make up the report to just show icons without a text.

Though it would be nice if it would save that state, because when you switch between several saved reports it always gets expanded again... :-(

If you haven't joined the beta program yet, it's getting time! Sign up and help to make this release as stable as possible!

Labels: ,


« ... Read full posting ... »

Looking for BI Publisher information?

Since Oracle APEX 3.0 was released which integrated BI Publisher or XML Publisher as it was called before, this reporting tool is getting more and more interesting for Oracle APEX developers. At least if your company can afford the not so cheap license fees ;-)

For the past few weeks I was following a new BI Publisher related blog and thought it's really time to share the link with you. Have a look at The Amazing Adventures of BIPgirl with BI Publisher. :-)

BTW, don't forget about Tim Dexter's Oracle BI Publisher blog.

Labels:


« ... Read full posting ... »

ApexGen: A new Oracle APEX related open source project!

Morten Braten just released this first Alpha Version of this new project called ApexGen - The Oracle APEX Generator. From the project description:
ApexGen is a utility to generate Oracle Application Express (Apex) pages and page components based on a PL/SQL API, in a fraction of the time it takes to manually create report and form pages.

I have downloaded the files and had a quick look at the documentation. Actually it's a much nicer documentation than mine for the ApexLib Framework. Clean and very nice layout! To my rescue I can say that I already redid the layout for my Oracle APEX Builder Plugin project a few weeks ago, because I thought it needs better marketing. Just haven't announced the new web-site yet. But back to the topic. :-)

The tool and the scope of the project looks really interesting and can really speed up your development! As soon I have more time I have to take a more detail look at the source code and how I can use it. From my quick look at the documentation, I noticed that Morten is using the same $KEYWORD$ hint syntax than I'm using for the ApexLib Framework. Now I'm sure, it can only be a good piece of software :-)

Great to see that there are also other people starting Oracle Application Express (APEX) related open source projects!

Check it out and give Morten some feedback! That's what motivates an open source developer to continue developing!

Labels: , ,


« ... Read full posting ... »