Recent Posts

APEX 5 & Hackathon der Deutschen Bahn in Frankfurt

Von Tobias Arnhold → 3.13.2015
Wir alle wissen wie schnell es möglich ist mit Hilfe von Oracle APEX professionelle Anwendungen zu bauen. Nun wird es Zeit das Ganze in einer Challenge zu beweisen.

Die Deutsche Bahn veranstaltet am 20. und 21. März in Frankfurt am Main die DB Open Data-Train Challenge.

Ich werde Teil eines 4-Mann Teams sein und alles geben um APEX scheinen zu lassen. Um den Ganzen noch mehr Würze zu geben, werden wir die Anwendung mit einem APEX 5 Prototypen erstellen. ;)

Wer im Raum Frankfurt wohnt und bereit ist für eine richtige Challenge der kann sich hier anmelden:

Links rund um das Thema:

Oracle SQL: Calculate the amount of workdays (Mon-Fri) between two dates

Von Tobias Arnhold →
I searched the net for a problem in finding a way to calculate the workdays between two date values. After I tested a couple of solutions I focused to one where I didn't necessarily need a extra select to solve that issue.

I found a post at
The described function itself looked like that:
-- Created by Sonali Kelkar from Newton, MA USA
CREATE OR REPLACE FUNCTION num_business_days(start_date IN DATE, end_date IN DATE)
busdays NUMBER := 0;
stDate DATE;
enDate DATE;


stDate := TRUNC(start_date);
enDate := TRUNC(end_date);

if enDate >= stDate
  -- Get the absolute date range
  busdays := enDate - stDate
        -- Now subtract the weekends
        --  this statement rounds the range to whole weeks (using
        --  TRUNC and determines the number of days in the range.
        --  then it divides by 7 to get the number of weeks, and
        --  multiplies by 2 to get the number of weekend days.
     - ((TRUNC(enDate,'D')-TRUNC(stDate,'D'))/7)*2
        -- Add one to make the range inclusive
     + 1;

  /* Adjust for ending date on a saturday */
  IF TO_CHAR(enDate,'D') = '7' THEN
    busdays := busdays - 1;

  /* Adjust for starting date on a sunday */
  IF TO_CHAR(stDate,'D') = '1' THEN
    busdays := busdays - 1;
   busdays := 0;

I did had some issues with the TO_CHAR(stDate,'D') logic and my German character set.
Because of this I looked further and found a solution by Frank Kulash at the Oracle forum:
1 + TRUNC (dt)
  - TRUNC (dt, 'IW')
Finally I was able creating a logic which I could use in my select. To make it more readable for you I created a from dual select:
  - (((TRUNC(end_date,'D')-TRUNC(start_date,'D'))/7)*2)
  + 1
  - case when (1 + TRUNC (end_date) - TRUNC (end_date, 'IW'))  = '6' then  1  else  0  end
  - case when (1 + TRUNC (end_date) - TRUNC (end_date, 'IW'))  = '7' then  2  else  0  end
  + case when (1 + TRUNC (start_date) - TRUNC (start_date, 'IW')) = '7' then  1  else  0  end
  as amount_of_workdays
  ( select
    to_date('06.03.2015','') as start_date,
    to_date('07.03.2015','') as end_date
    from dual

APEX 5 EA Impressions: Page Designer (Part 3)

Von Tobias Arnhold → 3.09.2015
I think one part of the "Page Designer" is quite unfamiliar even to experienced APEX developers.

It is the "Grid Layout". Even I still struggle getting used to this new feature.
For that I will give you a small example how to read the new grid.
Maybe some of you have seen my example application about RaphaelJS.

I migrated this application into the new APEX 5 EA. Btw: No issues occurred.

What you see are three regions. The one above is including a select item and below are the other two beside each other. One is showing the harbor (report-view on the left) and the other one is showing the detail mask (on the right).

Inside the new "Page Designer" it looks like this:

You can see all three regions including all detail elements in each region.

To make it even more clear I put both views together:

What you see on the left is a shortened version of the "Pager Designer Grid View", surrounded with different rectangles to show the different regions and arrows showing to the right. There you see the application marked with the belonged rectangles.
Maybe you have seen that the button area on the left is shortened because of lack of space. But this example makes one thing clear. You need a big screen to not get the wrong perspective on the new "Grid View". For that I propose a curved 34" monitor. ;)

Sure it is not easy getting used to the new "Grid View" but on the other side if you are new to APEX it will be a really handy tool to learn and build even faster. :)
APEX-AT-WORK no image

APEX 5 EA Impressions: Page Designer (Part 2)

Von Tobias Arnhold → 3.07.2015
In part 2 I want to show you a nice collection of valuable information about the new "Page Designer"

First link will lead to a great presentation from Scott Wesley (Nov 2014). It is a "must have" if you want to know more about the topic.

Next is information about a webinar presented by David Peake on Tue, Mar 31, 2015 6:00 PM - 7:00 PM CEST:

Until then you can watch a video created by him about the new "Page Designer":
APEX 5.0 - Page Designer Grid Layout

Also Dimitri Gielis blogged about his impressions with the new "Page Designer":

Another blog post shows you some of the differences in creating regions with APEX 4.2 Tree View and APEX 5 Page Designer:

Finally the new Early Adopter documentation completes my list:

APEX 5 EA Impressions: Page Designer (Part 1)

Von Tobias Arnhold → 3.06.2015
The development with the new page designer feels different.
Before you can say if it is good or not. You will have to make a whole APEX project and force yourself to only use the new "Page Designer" instead of the old "Component View".

So in this post I will show you where everything ended up when you compare the old dropped "Tree View" with the new "Page Designer".

First we take a look at the old "Tree View":
There we have 4 different types: Processing, HTML Elements, Shared Components, Dynamic Actions
As you see most of the page is filled with type "Processing".

This has changed in the new "Page Designer".
The "HTML Elements" has taken most place. Pre and Post Rendering processes are still located under "Rendering" and not "Processing"!
Important is the fact that the different types are still differenced on the left side.
You just need to click on the respective icon:

Each object on left and in the middle can be clicked. Details will appear on the right side and can be edited there.
If you still feel insecure then just switch to the old "Component View":

APEX 5 EA Impressions: Little visual changes

Von Tobias Arnhold →
This time I will show you the small changes which will appear in every migrated APEX application.

For the better understanding I show you an old and a new example (all tested with Mac and Firefox):

Date Picker - Icon:

 Date Picker - Date Selector:

Rich Text Editor:

Interactive Report (IRR):
Compared to the other both examples the new IRR makes the biggest different. For that I added 3 examples with different themes to show you what you have to expect. 
As Joel Kallman already mentioned the IRR will not work with custom plugins or changes as it did before. None of my examples uses custom plugins or JS code. Only CSS code has maybe been modified!

Example 1 - Sample Application

Example 2

Example 3

So be aware that especially the interactive report does not look like before.  You may even have to consider more work in updating your application documentation.

APEX 5 EA Impressions: Custom jQuery / jQuery UI implementations

Von Tobias Arnhold → 3.05.2015
Next days / weeks I will post from my experiences with the new APEX 5 EA. Today I will show a common mistake in current APEX applications. Because APEX 4 has not the newest versions of jQuery or jQuery UI included. Even so the development continued and some developers just added newer version of jQuery (UI) into their page templates or headers. Unfortunately APEX 5 is not so happy about it. :)

Example of wrong page template implementations:

And how APEX 5 does handle it:
TypeError: e.widget.extend is not a function ...+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._ge...

The result is a not working application where even the Developer Toolbar is missing. Be aware of custom jQuery and jQuery UI implementations.