Skip navigation.

Denes Kubicek

Syndicate content
Denes Kubicekhttp://www.blogger.com/profile/01962373591521960882noreply@blogger.comBlogger190125
Updated: 11 hours 4 min ago

Tabular Form - Add Rows Top - Universal Theme

Wed, 2015-05-20 06:20
This old example shows how to add rows to the top of the tabular form. Unfortunately this doesn't work with the new Universal Theme. In order to make it working some small changes are required. See this example on how to do it using the new Universal Theme.

Enjoy.

Categories: Development

APEX 5.0 - New Features Training

Mon, 2015-05-11 23:42
Unser Training startet in knapp drei Wochen. Es ist zeit sich anzumelden. Wir (Dietmar und Denes) haben Tobias Arnhold eingeladen und er erzählt über das Thema Migration auf APEX 5.0. Tobias ist einer der wenigen Betatester von APEX 5.0 in Deutschland gewesen und hat die wertvolle Erfahrungen damit gemacht, die er mit uns teilen wird.

Unsere Themen zu APEX 5.0 sind zahlreich und vielfälltig. Wir decken fast alles wissenswertes ab:

1. Page Designer,
2. Universal Theme,
3. Dutzende von kleinen aber unbekannten Verbesserungen,
4. Interactive Reports,
5. File-Handling,
6. Deprecated Features und Known-Issues,
7. Modale Dialoge,
8. Mobile Anwendungen
9. Viele weitere Themen wie Auswirkungen der neuen Features auf bestehende Komponenten:

   a.Forms und Tabular Forms
   b.Plugins und Dynamic Actions

10. Migrationsthemen



Categories: Development

APEX 5.0 Universal Theme Bug - Update

Sat, 2015-05-09 02:08
The APEX team came up with a temporary fix for this issue. Please visit this forum posting for all the updates on the issue. Basically, you need to run a small function on page load. The solution is also described there.

By the way this is one of the three bugs I have discovered so far.

Categories: Development

APEX 5.0 Universal Theme Bug

Wed, 2015-05-06 02:13
The problem I described here is strange. In my case and I tested it on several laptops with many browsers and multiple installations, appears to be a Universal Theme related bug and occurs in some specific constellation - in my case on Windows 8.1 running FireFox or Google Chrome (IE11 works as expected). I noticed this problem while working on the Tabular Form chapter for the new Expert APEX book. The first thought I had is that I see pink elephants because the colleagues I asked to check the issue couldn't confirm it - they were using different OS. This seems to be somehow Windows 8.1 related by I am not 100% sure. Your help would be great and if you have the same problem, please join the post and provide your input.

Categories: Development

APEX You Tube Channel

Sun, 2015-05-03 02:56
Great idea to organize the Oracle APEX YouTube Channel. David Peake has started a Video Series about the new Page Designer in APEX 5.0. You should have a look.

Categories: Development

jQuery Toggle Image

Thu, 2015-04-30 06:20
For this, you will need two lines of code. In case you want to save the values, there is a bit more work to do but everything can be done using standards.

Categories: Development

jQuery - Replace Image

Wed, 2015-04-29 11:06
I am posting this just because I am getting questions related to this or similar issues all the time. In this example you can see how you can replace images on the fly in your page using Dynamic Actions. There are at least two good ways to do that:

1. Rendering images in a report. Refreshing a report is a predefined event in a Dynamic Action and doesn't require coding.

or

2. Using jQuery to do that.



Enjoy.
Categories: Development

Tabular Form - Change Column Type

Wed, 2015-04-29 05:34
Just started a new version of My Demo Application - based on APEX 5.0 and Universal Theme. There, I will rework the old content and provide some interesting new possibilities (as of 4.2). In this example I am showing how to change the column type from Text to Display in a tabular form.



When could this be useful? For example if you have a certain group of users not allowed to edit a column and you don't want to create additional and conditional columns. Eventually you can use this to set only specific rows to display only depending on your application logic.
Categories: Development

APEX 5.0 - PL/SQL Function Returning Error Text - Bug 20971572

Tue, 2015-04-28 05:25
I prefer using PL/SQL Function Returning Error Text while creating validations. Two days ago I discovered a bug - it is not possible to create the function if no error message entered. This bug has been documented and will probably be fixed in 5.1. The workaround is to enter a dummy text like "ERROR" or similar.

Categories: Development

APEX 5.0 and Standard Report Column

Tue, 2015-04-28 05:20
If you are using the new Page Designer in APEX 5.0, you may search for the "Standard Report Column" in the list of column types. If you switch to the component view, you will see it. In the Page Designer you don't have the old column types any more. You should choose "Plain Text" and activate the option "Escape special characters" on the bottom of the column options.

Categories: Development

Expert Oracle APEX 2nd Edition

Mon, 2015-04-27 12:19
Just submitted first of my two chapters (Tabular Forms) for the new Expert Oracle APEX 2nd Edition. The chapter is covering the most important practices in Tabular Form handling. Also, a couple of neat features like cascading select lists in Tabular Forms - this time using standards only. Still not sure when the book will be published but it should happen soon.

 Follow on Twitter
Categories: Development

APEX 5.0 Summer School 2015

Mon, 2015-04-20 09:19
Es tut sich ganz schön was in der APEX Community dieses Jahr. APEX 5.0 wurde veröffentlich. APEX Connect im Juni findet statt und sollte bisher der größte APEX-Treffen im deutschprachigen Raum werden. Nun, wurde auch eine Reihe an Webinaren organisiert - APEX 5.0 Summer School - für alle, die keinen Urlaub machen oder für diejenigen, die den Urlaub langweilig finden. Meldet euch an. Die Anzahl der freien Plätze ist nicht unendlich.

Categories: Development

APEX 5.0 will be released today

Wed, 2015-04-15 11:14
Great news. Just finished wathching the Google hangout with the APEX team. They confirmed that APEX will be released today. The download should be made available soon. Stay tuned.

Categories: Development

Ask the Real Experts

Mon, 2015-04-13 01:39
On Wednesday you will have a chance to ask the APEX developers anything you would like to know about APEX 5.0. See this posting from Patrick Wolf or go directly to the registration form in order to get a link.

Categories: Development

apex.oracle.com - Upgrade to APEX 5.0

Mon, 2015-03-23 03:16
It is time to get used to the new APEX builder interface. apex.oracle.com has been upgraded to the latest pre-production version of APEX 5.0. Some functionality like "Administration" are not visible any more and you have to search a bit. The overall impression is good and my old demo application seem to still work in the most of the cases.



Enjoy.
Categories: Development

Read Only Item Layout

Tue, 2015-03-17 02:08
The possibility to set the items conditionally to read only is one of the important security features in APEX. Using this feature you can secure your applications and it will not be possible to manipulate the protected item (region or page). The downside of this feature is that it will change the layout of the protected items to some kind of standard, ignoring the previous formatting in the "normal" mode. If you have a form which looks like this:



and change the description item to the read only mode, then the page will look a lot different and will be hard to control:



In such cases you can help yourself in different ways. Using some css or jQuery, you can make those read only items to appear only slightly different. For example, I used this code to change the layout of the description item on page load:

$('#P3_BP_DESC_DISPLAY').attr("readonly","readonly").css({"font-weight":"bold","color":"#ccc","display":"block","width":"240px"
,"height":"120px","overflow-y":"auto","border":"1px solid grey"})


and the result looked like this:



There are also some other more generic methods:

.display_only {font-weight:bold; color: #ccc; display: block; width: 200px}

$('[id*=_DISPLAY]').css({"font-weight":"bold","color":"#ccc","display":"block","width":"200px"})

$('.display_only').css({"font-weight":"bold","color":"#ccc","display":"block","width":"200px"})


The only thing you need to note is that setting an item to the read only mode will create two page elements. The displayed element will get the suffix _DISPLAY added to the corresponding item ID.

Enjoy.
Categories: Development

APEX Connect June 2015

Wed, 2015-03-11 07:39
APEX Connect in Düsseldorf in June 2015 is going to be the biggest APEX-only event in Germany so far. You should consider joining us.

APEX Connect in Düsseldorf im Juni 2015 wird der größte APEX-Treffen bisher sein. Meldet euch und hilft uns es noch erfolgreicher und größer zu machen. Viele interessante Vorträge und vor allem viele interessante Persönlichkeiten aus der APEX-Welt werden dort sein. Das ist eine ausgezeichnete Gelegenheit viel Neues zu erfahren. Anmeldungsformular kann man hier aufrufen. Die Preise sind moderat und durchaus im Rahmen.

Categories: Development

A good Rule of Thumb

Fri, 2015-03-06 09:03
I like the newest blog post from Joel Kallman and especially his rule of thumb:

"My rule of thumb - when you're editing code in a text area/code editor in the Application Builder of APEX and you see the scroll bar, it's time to consider putting it into a PL/SQL package."

I would go further and say that even the smallest application you create should have at least one package for all the PL/SQL code you write.
Categories: Development

IR Scrolling - With a Little Help From My Friends

Mon, 2015-03-02 04:02
If you are working with interactive reports you will for sure be faced with a problem of wide reports. If you are taking care of the page layout and eventually have more than just an interactive report on the page, you will want to limit it's size to something making sense. The first problem will appear if you limit the width by setting the region attribute to something like this

style="width:830px"

and you will not see some of the columns:



If you add a scrolling by wrapping the region in a div and adding the following to the region header:

<div style="width:810px;overflow-x:scroll">

and closing it in the footer by adding:

</div>



you will be able to scroll with two ugly side effects:

  • The action bar will be included in the scrolling as well and disappear as you scroll to the right.
  • The sort widgets for the columns will appear on the wrong position the more you scroll.




  • You can solve this problem in the following way:

  • Remove the scrolling DIV from the region header / footer.
  • Use this java script in the page Function and Global Variable Declaration:

    function onload_ir(p_width, p_report_id){

    $('<div id="scroll_me" style="width:' + p_width + 'px;overflow-x:auto;display:inline-block"></div>').insertBefore('#apexir_DATA_PANEL'); $("#apexir_DATA_PANEL").appendTo("#scroll_me"); $("#apexir_DATA_PANEL").show();

    var or_Finished_Loading = gReport._Finished_Loading; gReport._Finished_Loading = function(){ or_Finished_Loading(); if(gReport.current_control=='SORT_WIDGET'){

    var offset_pos = $("#" + p_report_id ).position().left; var pos_left = $('#apexir_rollover').css('left'); pos_left = pos_left.replace('px',''); if (pos_left>p_width-100) {new_pos = parseFloat(pos_left) + parseFloat(offset_pos) - 25; $('#apexir_rollover').css('left', new_pos+'px');} }; }; };


  • Create a Dynamic Action which runs After Refresh (fire on page load option should be turned on) of the IR region and execute this script there:

    onload_ir(810, 7990109002761687)


  • 810 is the widht of the scolling region, which is a bit less then the total width of the region.

  • 7990109002761687 is the id of the data grid of the interactive report. You can find this id if you use firebug and scroll to the point where the data grid is placed.




  • What this script does is:

  • It will wrap the data grid into an additional div and add a scroll bar to it.
  • It will overwrite the IR onload function and add a sort widget positioning function to it in order to reposition the widget according to the scrolling.
  • The important part of the overloading function was done by Tom Petrus, who is a big help when it comes to tricky stuff like this.

    Now, once you have done that, your report will show up properly once you scroll it.



    Enjoy.
    Categories: Development

    The most frequently abused feature in APEX

    Wed, 2015-02-18 16:02
    Today I participated in the Scott's survey:

    https://apex.oracle.com/pls/apex/f?p=70347:Q::AAC3

    and there was one really interesting question:

    "What do you think is most frequently abused? (and why)"

    If APEX has any week points than it is definitely the fact that you can place your code almost everywhere. Especially PL/SQL chunks of code. If I start counting and list all the places it will be a very long list:

  • Page Read Only and Cache Page Condition
  • Region Conditional Display and Read Only Condition
  • Buttons Conditional Display
  • Items Conditional Display
  • Items Source value or expression
  • Items Post Calculation Computation
  • Items Default value
  • Items Conditional Display and Read Only Condition
  • Computations
  • Processes on Submit, on Load, on Demand
  • Validations and Validation Conditions
  • ...and yes, Dynamic Actions as my favorite.


  • There is of course more but I will stop counting here. If you start working with APEX this is great - you will easily get on target and have an application up and running in no time. A little bit of code here, a little bit there and there we go.

    This problem becomes obvious if you application is more than just a small and temporary solution shared between a couple of people. As an application grows it will start suffering from performance issues. Furthermore it will be hard to maintain it. It will have a dozens of complex pages with many items, many computations and processes, conditional buttons, validations and dynamic actions. If you practice writing anonymous PL/SQL blocks and you paste those wherever it is possible, your code will become redundant and slow. You will probably repeat the same code many times on your page. This means, your pages will require more processing time than they should. I would even go so far and say this is almost as bad as putting your business logic into triggers. Have you ever had a chance to debug such applications (and you didn't know the code was placed there)?

    The possibility to have so many options is of course great and useful. But it doesn't mean you should use all of the options. The other thing important to know is that you should never write anonymous PL/SQL blocks in your applications. Never! Whenever you need to use PL/SQL, you should use packages and place your code there. The probability that you will then repeat your code is quite low and for sure your application will run much faster.

    My proposal for the future version of APEX would be to have a subtitle for each of those containers saying "Handle with care" and providing some explanations why. I am serious here. Really.

    Categories: Development