Showing posts with label apex4. Show all posts
Showing posts with label apex4. Show all posts

Friday, October 08, 2010

APEX 4.0 Tree

In APEX 4.0 there's a new Tree Region. It's really cool and a lot better than the previous tree in APEX 3.x.

When you navigate throughout this tree there is no submit anymore, it also looks a lot better.

The only catch is that the query is not that straight forward.
If you look under the query, you'll see the explanation what columns the query should have etc. Be careful as the example under need is missing the level column!

Anyway, check out the tree, it's definitely something that people seem to like.

Monday, September 13, 2010

Upgrade to APEX 4.0 - Tabular Forms

It was a long time ago I promised this post, so finally today I found some time to finish the post.

In APEX 4.0 the Tabular Forms got enhanced quiet a lot. To make use of these enhancements it requires some manual changes of the page the tabular form is on, so when you upgrade your existing APEX 3.x (or older) applications the tabular forms are NOT upgraded automatically (or at least not completely), but they should still work like they did before.


The enhancement I want to discuss in this post is Adding a row to the tabular form.

Before APEX 4.0 when you hit the Add Row button, the page got submitted and a specific Add Rows process on the page got called.


In APEX 4.0 that changed: the page is not submitted anymore. When you hit the Add Row button, some javascript (addRow()) is called to add a new row to the tabular form.
So to make use of this enhancement, you need to make three changes:

  1. Change the button to not Submit the page anymore, instead it should "Redirect to Url" with as Url target: javascript:addRow();
  2. Delete the Apply MRU after submit processes (with the condition linked to the Add Row button): as the page is not submitted anymore when you click the Add Rows button it is not necessary to have that process anymore (obsolete)
  3. Delete the Add Rows after submit processes (obsolete)

To identify the pages you have to change manually I use this query:
select WORKSPACE, APPLICATION_ID, APPLICATION_NAME, PAGE_ID, PAGE_NAME, PROCESS_NAME
from APEX_APPLICATION_PAGE_PROC
where PROCESS_TYPE in ('Multi Row Update','Add rows to tabular form')
It results in the below output and shows which pages you still have these processes on:


Another thing I found while upgrading my applications to APEX 4.0 related to tabular forms: if you still used an old template lay-out, the new functionality didn't work (missing of some tokens) and some other things which got already fixed in the 4.0.1 patch (see patch notes).

Thursday, September 09, 2010

APEX 4.0: Application Utilities

I tend to use the Grouping functionality to logically group my APEX pages.
E.g. I've a group called 'Admin' which hold all the Admin pages.

I find it easy to see the pages for that section of the application and I can verify if my security model is fine on these pages. E.g. the pages should be protected with the Admin Role.
It also helps me to separate the work between developers. If I tell my colleague, go and change the Admin section, it's easy to find for that person.

You can also use ranges of pages for the different sections of the application.
E.g. 10000-20000 is for Admin pages.

Before APEX 4.0, the Grouping of Pages was in the Task area on the right hand side of the page, but that got changed. Now you find a lot of the Goodies in "Application Utilities" (see red arrow in the quick pick icons).

Clicking on that link will give you access to the Application Dashboard, the Upgrade Application wizard and many other features. On that page on the right hand side you'll see Page Specific Utilities.

Clicking on the "Cross Page Utilities" link will give you the links for grouping pages or bulk editing them (a feature I use a lot too, to rename my pages for ex.).


So the grouping feature is a bit more tucked away in APEX 4.0, but then you get a more logical grouping of features you can do.

Tuesday, September 07, 2010

Upgrading to APEX 4.0: jQuery

In a lot of my APEX 3.x projects I used jQuery to extend the standard functionalities of APEX with some more interactive (client-side) components.

In jQuery there are very nice plug-ins, like a modal window, a grid, tooltips etc.

If you try to run your APEX 3.x application in APEX 4.0 you might find these jQuery components/plug-ins are not working anymore. The cause can be multiple:

  • You might have used an older version of jQuery and the plug-ins you used with that, which are not compatible with the jQuery version in APEX (1.4)
  • You load jQuery, but APEX loads their build-in jQuery too and things get mixed up
During the migration of my APEX 3.x application to APEX 4.0 I just take off all references to jQuery I made myself. Just make sure that in your template the #HEAD# is before any other jQuery plug-ins you try to run. Also make sure the jQuery plug-ins you use are compatible with jQuery 1.4.2. APEX ships with a lot of extra jQuery plug-ins like jQuery UI, js-tree etc so if you used that it's not necessary anymore to include them. (to see a complete list of files that ship with APEX, look into /images/libraries/)

Before I loaded my files as part of my Page Template, but I'm not sure I would still do that.
If you switch from template you lose the references. It might be better for maintainability point of view to include it in a region on Page 0. It will have a small performance hit, as APEX will have to look for it on Page 0, but it makes maintainability easier.
But going forward I'm converting all my custom javascript and jQuery plug-ins to APEX plug-ins and the files get loaded as part of the plug-ins. A lot of the javascript can disappear as it can be replaced by the build-in Dynamic Actions of APEX 4.0.

Hope it can help some of you when you see javascript errors when you try to run your APEX 3.x app in APEX 4.0. But don't panic to fast, it's probably just the way jQuery gets loaded.

Saturday, June 05, 2010

apex.oracle.com upgraded to APEX 4.0

If you go to http://apex.oracle.com you'll see APEX 3.2 got replaced by APEX 4.0 which means over 30.000 applications got migrated to this new release (speaking of a great test instance ;-)).

But this also means we are very close to the public release of APEX 4.0!

apex.oracle.com must be one of the biggest APEX instances in the world as everybody can subscribe for a (free) workspace. Although it's meant to try-out APEX and develop on it (so no production apps) it gets over 3 million page views a week!


You can read more about this upgrade on Joel and David's blog and checkout this new apex.oracle.com.