Skip to main content

Posts

Updateable IR...at least sort of ..(a.k.a calling an On Demand Process on a Public Page)

On apex.oracle.com I created an example of an updateable Interactive Report. It is not an in-line update functionality, but you can click on an image and so update the status of a record. It is not rocket science but a nice way to present such a functionality to your end users. But while creating the example I discovered that the example worked on a Page that requires Authentication, but didn't work on an Public Page... To call the On Demand Process I used the namespaced function apex.ajax.ondemand, instead of the more or less old-fashioned htmldb_Get. But unlike the htmldb_Get, apex.ajax.ondemand has no parameter for the page where the process should run (actually apex.ajax.ondemand passes '0' as the page parameter to htmldb_Get). So in order to get things working I needed to mark Page 0 as Public also... I guess it would be a nice enhancement if you could either pass a page parameter to apex.ajax.ondemand (default 0 is acceptable) or it should use the current page ($v(...

Down memory lane

Very off topic.... Yesterday evening I went to the 40 years old rock opera "Tommy", this time not performed by The Who but by the Dutch band Di-Rect. The did a great show, with the original music, but with all the lyrics translated to Dutch. I really liked it, and I don't think I'm showing my age here, because 75% of the audience wasn't even born when the original record came out... For an impression, see the video below.

Returning a value by clicking on a row

In my previous post I showed a generic multi column LOV Report. One withdrawal was that the user has to click the first column to pass the selected value back to the calling form. It would be much nicer if you could click anywhere on the row, wouldn't it? To pass back a value you (used to) create a Named Column Report, but that is much too static. By adding onclick="javascript:passBack( $(this).children('td:first-child').html() );" to the TR tag in the Before-Each- Row region you can click anywhere in the row and that will pass the value of the first column back to the calling page. Looks much nicer huh? But (ofcourse) you need to install jQuery first....

Creating dynamic multi column LOV's in APEX

The default LOV's in APEX are implemented as a pop-up window, with the restriction that you can only show one display value. This is sometimes just what you need, but mostly it is not sufficient. You can create a longer display value by concatenating strings, but that won't enhance the looks of your application. What you do need is an LOV with multiple columns, more or less something similar as the LOV's you can get in good old Oracle Forms. You can create an LOV Page for every LOV that you need and create a button with a link to that page for any item, but than you'll end up with lots of pages. Wouldn't it be better to use a similar feature as APEX itself has: Define an LOV query and attach that to an item? So I created two tables: LOV_ITEMS and LOV_DEFINITIONS. The first one holds a reference to the APEX Page Items and a reference to a LOV Definition. The last one contains the SQL Query that will be used in one generic 'LOV Page' to show a report that...

MacMenu for APEX

A MacMenu sounds rather unhealthy , but if you can create your own one.... See it in action at the bottom of this page . The explanation on how to get this kind of result is also on that page.

My UKOUG ratings

As a final message from the UKOUG I got the ratings for my session. And they are absolutely amazing (4 = Good; 5 = Very Good; 6 = Excellent): Overall My Session Topic 4.46 5.57 Content 4.31 5.46 Presentation Skills 4.40 5.37 Quality of Slides 4.20 5.43 Value 4.26 5.56 Some additional remarks: I wish my line manager (who has a Java background) had seen this presentation as he thinks Apex is too lightweight! Excellent!; Great; Fantastic session; Great!; Would like more. Just what I needed to know to solve some issues, but I've got no tech ability yet - off to read :-); Excellent demo - very interesting. Has shown the possibilities open to us!; lots of javascript is hard to follow. So I am glad I was in this session ;-). Thanks everybody who rated me for these great results. I hope I can keep up this level for the next events (O>Zone, ODTUG).

Abstract ODTUG accepted!

Yesterday evening I received an e-mail from the Speaker Coordinator of ODTUG's Kaleidoscope 2009 that my abstract on How to integrate APEX and Oracle Forms? has been accepted for presentation! I'm looking forward to present and to meet again all the great people I met at the previous event in New Orleans. I have 'some' time to create the actual presentation - with some nice demo's of course - because the event is starting about half a year from now. If you have any specific subject on this matter you would like to see during my presentation, please drop a comment!

Moving through tabular forms using the Up/Down arrow keys

Today there was a question on the Oracle APEX forum about How to Navigate through the rows of Report using up or down key . This question pop ups now and then and I decided to figure out how to do this. The solution is quite straight forward: Set the Element Attributes of the columns of the tabular form to : onkeyup="moveUpDown(this, event)" and create a that function in the HTML Header: function moveUpDown(pThis, pEvent){ var keynum; var current = document.getElementsByName( pThis.name ); if(window.event) // IE { keynum = pEvent.keyCode; } else if(pEvent.which) // Netscape/Firefox/Opera { keynum = pEvent.which; } if (keynum == 40 || keynum == 38) // Key-Up or Key-Down { for (i=0;i { if ( current[i].id == pThis.id ) // This is current row { if (keynum == 40) // Move down { current[Math.min(current.length - 1,i+1)].focus(); } else // Move up { current[Math.max(0,i-1)].focus(); } } } } } Check out the live example . PS: Cha...

LOUD 2008

Yesterday evening Logica held the annual LOUD (Logica's Oracle Update Day) event. A tradition is that there is an award for ' Best Acting Consultant ' (nothing to do with role playing ;-) ). And this year the winner is....(or are): Rutger and myself! We got the award for our continuous effor to spread the APEX gospel within - and outside - Logica. And of course a bottle of champagne came along... Apart from that there was a keynote and 12 presentations in four tracks - Fusion, Development, Apps and DBA. Rutger and I also did a Live-Web-Application-Development-with-APEX session (for which we received an addtional bottle of wine....). All in all a great evening, and it is always good to see so many colleagues (about 160) 1interested in the Oracle toolstack.

It is even more easy to replace the APEX with the jQuery calendar...

In a previous post I described how to replace the default APEX calendar with a better looking jQuery calendar. But one of the steps is that the " Display as " and " HTML Form Element Attributes " needed to be changed. But using jQuery more extensively that isn't even necessary. When you put the following code in an HTML Region on Page 0 (assuming you already included the jQuery stuff), all existing APEX calendar items are automagically 'converted' to jQuery calendar items. (No guarantee though: I didn't test it on all sorts of pages, may be dependent on your template). Look here for a live demo... $(function(){ // Remove original Datepicker $("td.datepicker + td" ).remove(); // Add jQuery Datepicker to all Datepicker input fields that are not hidden $("td.datepicker > input[type!=hidden]" ).datepicker( { dateFormat : 'dd/mm/yy' , closeText : 'X' , clearText : '' , showO...

APEX : How to emphasis Required Fields...

In APEX there is no property to mark a field as a required field (at this moment, could be an enhancement request!). However you can mark the prompt of a field by using the 'Required' template - with or without help. So why not use the APEX Repository to enhance the look-and-feel of your application and show the user which fields are required? And of course we use jQuery to accomplish this. This is how you do it: Create an On Demand Application Process (lets call it getRequiredItems) and fire it onLoad - After Header: DECLARE CURSOR c_items IS SELECT item_name FROM apex_application_page_items WHERE item_label_template LIKE 'Required%' AND page_id = :APP_PAGE_ID; item_list varchar2(32000) := ''; item_sep varchar2(1) := '~'; BEGIN FOR r_item IN c_items LOOP item_list := item_list||r_item.item_name||item_sep; END LOOP; -- P0_REQUIRED_ITEMS is an hidden item on Page 0 :P0_REQUIRED_ITEMS := substr( item_list, 1, length( item_list ) -1); END; This proc...

How to replace the default APEX calendar with jQuery calendar...

One of the things I talked about during my presentations at OOW and UKOUG is how to replace the (not so good looking) default APEX calendar with a (much nicer) jQuery version. So here are the steps: 1. Download jQuery and jQuery UI from the jQuery website . Upload the jQuery javascript files to your webserver (or into your database if you are using the EPG). Or use GoogleCode... 2. Create a HTML Region on Page 0, containing the references to the uploaded stylesheets and javascript files. Something like this: 3. Set the "Display as" property of the date fields to 'Text Field" and set the "HTML Form Element Attributes" to : class="datefield". 4. Back in Page 0, add a function to the jQuery 'document ready' function to add the jQuery datepicker to all fields with that class: $(function(){ // Attach a DatePicker icon and function to input fields with class="datefield" $("input.datefield").datepicker(...

Oracle Designer Extension for SQL Developer

In SQL Developer there is an Application Express node. That is a great way to browse through the APEX Repository. And wouldn't it be great if you can use the same technique to browse your Designer repository? Can we build it...yes we can... Using User Defined Extensions you can create something like this: 'Just' create an XML file to query the Repository and add it as an extension of the Navigator type. This XML file does what is shown in the pic above (it is not finished yet, and anyone who wants to contribute...feel free to add more subnodes/details!). Just click on 'expand source' to see the code. SELECT 'Entities' name from dual ...

UKOUG 2008 Report Back

This year I decided to do just one post about the UKOUG and not - as previous year - (try to) get out a post every day. Takes the pressure of me... The first impression is that Birmingham was quite cold this time of year, the second is that the UKOUG seems less crowded this year. The first observation is quite right, the second one is wrong. Due to the shifted schedule of the session, they not all start and end at the same time, so the crowd is more scattered over the day. So no long lines for the food or traffic jams in the Exhibition Hall (the fact was that there where about 2,250 attendees, 'just' 5% less than next year - probably to do with the financial situation out there). I won't list all the sessions I went to: See the previous post about my intentions - I didn't made all of them... My personal top 3 this year (in order of appearance): Beginners' Guide To Trouble-shooting by Jonathan Lewis I had never seen Jonathan presenting before but it is good to get a...

UKOUG is right around the corner!

In a few days I will pack my bags and head off to Birmingham for the 2008 version of the UKOUG. I am looking forward in meeting old friends and making new ones. And of course - attend some of the most interesting sessions available in Europe! While I was setting up my agenda for the week I noticed that on every day the first session starts at 9:25. That makes it a lot easier to network at night... My agenda contains a mix of Fusion, DBA, Development sessions and of course APEX (all though there is not that many APEX sessions). It is gonna be a busy week! Monday Advanced SQL for PL/SQL Programmers Oracle Application Express Now and in the Future Oracle Forms: Features and Future Building Your Business Services in Oracle ADF: A Case Study of Redeveloping an Oracle Forms Application UKOUG 2008 Opening Party Tuesday Follow up session to 'Oracle Exadata - Extreme Performance' Beginners' Guide to Trouble-shooting Extreme Reusability - New Features in Oracle ADF 11g (FTMS) Designi...

Integrate Oracle Forms with APEX

APEX 3.2 will contain functionality to migrate Oracle Forms to APEX. I am one of the (about) 10 lucky people that take part in testing the Limited Early Adopter release, so I know what it can and cannot do (I will blog about that later). In 2007 Wilfred van der Deijl did a presentation at ODTUG about the integration of Oracle Forms with JSF, JSP and ADF Faces. This eventually resulted in a product OraFormsFaces . The technique he used is elaboratly described in this Step-by-step guide . So I thought: Why not try to copy this technique and do this also in APEX? So first I created a simple form showing Orders (all is based on the HR scheme). The second step is to incorporate this Form in an APEX region. So I created a page and within that page a PL/SQL region. The region source is a call to a database procedure APEX$CALL_FORM. This procedure has a couple of arguments, like formname, username and password. This procedure simply uses htp.p to put out the same tags that are used to show a f...

I am officially an APEX Pro now....

Today I received the silver medal on the OTN APEX Forum ! 500 more to become an Expert... Or should I go for an Ace of Spades....

Tom Kyte's prequel to Guru4Pro

Yesterday over 100 Pro's attended Guru Tom's session on '11 Things about 11g'. But in the hours before that session a small number (about 18) of persons had the honor of listening and discussing with the master himself. As a guide he used an extensive version of his ' Worst Practices ' presentation. During - and after - the presentation there was a lot more Q&A than I've experienced in regular sessions - of course due to the small scale of this session. On a question about the new features and enhancements of 11gR2 Tom told that there will be no export functionality anymore in R2 (import will be available though). For moving data from one instance to another you should use datapump or SQL Developer or APEX. Also he explained a little more about the Online Application Upgrade . This feature will use invisible indexes, cross edition triggers and (a maximum of) two versions of PL/SQL programs and views (tables are not versionable). It sounds like it is not ...

Pro4Pro : Extreme RAD with APEX

Yesterday evening Rutger and I did a Pro4Pro session with the fascinating title "Extreme RAD : Live Web Application Development with Oracle Application Express" . In this session we built an APEX application to manage a conference with different kinds of users like organizers, presenters and attendees. We had just a little preconfigured: the tables and views where there, we created a workspace and had set the UI defaults in advance. The rest was all l ive. During the 1,5 hour session we built all the screens, authentication and authorization to manage such and event. The last 15 minutes the audience had the opportunity to put forward some additional functionality and we (try to) build that also - we couldn't translate the whole application to another language in that time, but we showed the date and money localizations. At last we showed what such an application could look like if you spend a day or three on it - with up- and downloading presentations, dragging and dropp...

The saddest post

This is probably the saddest post I'll ever write. Just as many of you, today I also received the message that Carl Backstrom died in a tragic car accident last weekend. I met Carl on two events this year: ODTUG and OOW. He was a very nice and energetic guy to talk to, open to everyone who wants to talk to him. Apart from the neverending fly whiskeys at the the bar in the hotel lobby and the visits to some Bourbon Street bars, I guess a lot of APEX'ers will remember him by his presentation on last ODTUG. Dan McGhan , as an ambassodor for that session, introduced Carl as The UI God . And Carl did his most nervous presentation ever I guess. He struggled with the mic because his hands were too shaky to get the clip fixed the right way. And everybody wondered why he could be so nervous as he knew so much and we knew so little. But that was typically to Carl: Although he knew everything about APEX, Javascript, jQuery and JSON, he still was a regular guy, happy to share his knowledg...