Skip to main content

Posts

Refresh selected row(s) in an Interactive Grid

In my previous post I blogged about pushing changed rows from the dabatase into an Interactive Grid . The use case I'll cover right here is probably more common - and therefore more useful! Until we had the IG, we showed the data in a report (Interactive or Classic). Changes to the data where made by popping up a form page, making changes, saving and refreshing the report upon closing the dialog. Or by clicking an icon / button / link in your report that makes some changes to the data (like changing a status) and ... refresh the report.  That all works fine, but the downsides are: The whole dataset is returned from the server to the client - again and again. And if your pagination size is large, that does lead to more and more network traffic, more interpretation by the browser and more waiting time for the end user. The "current record" might be out of focus after the refresh, especially by larger pagination sizes, as the first rows will be shown. Or (even wors...

Push changed rows to an Interactive Grid

For pushing changes from the database to the end user, the regular solution is using websockets. A change in a record is detected - using a trigger or using the CQN (Change Query Notification) feature - and a notification is send to a websocket server. That websocket server broadcasts the notification over a channel to all browsers that are tuned in to that websocket channel. Then the browser reacts to that notification, usually showing an alert or refreshing a report. This trick is described on multiple sites, just Google for " oracle apex websockets " or similar. So back in the old days, we used that notification in the browser to refresh the (interactive) report. But along comes the Interactive Grid (IG) . While he full-refresh mechanism still works for IG, an IG has also the option to refresh just one row.  So wouldn't it be awesome that just the changed row(s) get refreshed upon a change in the database, instead of the whole report? Can we do it ... yes we ca...

A review of APEX World 2017 - Day 2

(You can read my impression of the first day here ) After a short but good night sleep and an excellent breakfast, Mike Hichwa delivered his second keynote " RAD Challenge: Build a Real World application in 60 minutes ”. Although he suffered from connection issues, Mike managed to wow the audience showing the new packaged app "Quick SQL” and  the new (currently Cloud-only) “Blueprint” option to create a new application. As JSON is not code (but just a collection of value-attribute pairs), it was really a  no-code showcase! Then it was parallel session time again and I went to see how Christian Rokitta would "Bootstrapify Universal Theme” . The message is: You don’t have to unsubscribe from the Universal Theme (and please don’t!) to create an application that looks totally different from the “regular” APEX applications. Then I had to deliver my second presentation “ Docker for Dummies ”. It was aimed at people who might...

A review of APEX World 2017 - Day 1

Last week the SS Rotterdam was the beautiful location of the largest gathering of APEX Developers worldwide. With around 380 (!) attendees a new high was set. And they came from all over the world : I spotted people from The Netherlands, Belgium, Switzerland, Austria, Croatia, Germany, Denmark, Norway, UK, Ireland and the USA. And I even might have missed one or two …. The event started with a presentation by the “father of APEX”, Mike Hichwa, talking about " Oracle APEX Past, Present and Future ”. Of course everyone is curious what the APEX future might bring: Friendly URL’s, automated testing, more JSON, concurrent APEX versions, third party Oauth 2 authentication (think Facebook, Google), APEX app diff and more, a lot more, REST capabilities. And now we have to wait for APEX 5.2 … and that might take a while!  After this keynote, the conference split up in three tracks. After the coffee break I returned to to big theatre where Geertjan Wielenga talked ...

EECS - Oracle Exadate Express Cloud Service, Step 4 : APEX !

So what are my experiences using EECS doing some APEX work? First of all, it is not blazing fast. Probably caused by the latency (as mentioned in my previous post). It is not slow, it is just ok('ish).  Second, and way more important, it runs APEX 5.0.4 ! So whatever Oracle advertises about " Cloud first " ... it doesn't seem to apply to APEX (or APEX on EECS). So this fact alone makes this environment useless for demo, development and presentation purposes at this moment. I heard through the grapevine that 5.1 will be available from April 25 - but that's still a month away. And that rumour could be false. Third, because you don't have access to a SYS account, you can't install something like APEX-SERT . Maybe the install scripts can be adapted for the PDB_ADMIN account - I haven't looked into that yet. Four : As mentioned in an earlier post, within an EECS PDB instance you get one and only one APEX Workspace. You can't add one (no...

EECS - Oracle Exadate Express Cloud Service, Step 3

Once you have defined your users for your Express Cloud Service, all users with the role of Database Developer or higher can access the database Service Console. From here all database related actions can be started. The upper category, Web Access, brings you to the specified part of the APEX builder - more on that in the next post. In the lower category you can create database schema's. For our goal within smart4apex, I created a schema for every developer. You can define whether the schema should be accessible from within APEX and creating an separate tablespace is optional. I haven't played around with the Document Store yet, so I have to skip that part. You can also set the password of the administrator of your PDB - the most privileged user within your PDB you have access to. Franck Pachot did an excellent writeup about the privileges of that user. I hoped the "Manage Application Express" would bring me to the "APEX Admin" environment - a.k.a. ...

EECS - Oracle Exadata Express Cloud Service, Step 2

Once you get your services up and running, you can log into your domain - in this screenhot "smart4apex" - on the Oracle Cloud. Then you'll end up in the "My Services" dashboard. As I have only one, my dashboard looks quite clean, showing just this widget: Just a few remarks for the designers of this: I am very curious why there is an extra " (Number of ..."  in the chart title. The same superflous text is also on another location on that page. And, more intriguing, what would "0.0323 database instances" mean? 1/0.0323 = 31. So something like days? But February has 28 days... It would make way more sense to just show here how many instances I had on those day (so, "1" al over the place...). From this widget you can drill into the "Service Details", where you can set rules and alerts and see the (historical) status of your instance. Funny thing is, I noticed this: These figures indicate, I have a storage limit ...

Intermittent ORA-06502 error when running APEX 5 on 12c

We upgraded our environment from 11.2 to 12c last week. This week we noticed an error in one of our APEX pages, a rather simple form for entering data. Nothing fancy, nothing spectacular - only a spectacular error when you tried to edit a record.  Running the page in debug mode (even on LEVEL9) wasn't very helpful as you can see below (10 points who immediately spots the error!). The error didn't occur for all records. It seems that a long(er) Code and Description field on the page resulted in an error more frequently. Also fiddling with a couple of the checkbox fields on the page had an effect. So I asked Twitter for help. And within a few minutes I got all kinds of tips and advice. But especially one, from Peter Raganitsch  was spot on. He suggested, looking at the debug output above, to take a look at the #CLOSE# position in the template. . My buttons are positioned in that #CLOSE# position, so I took a closer look at those. There were three that passed the Id, Co...

First steps using the Oracle Exadata Express Cloud Service

The Oracle Exadata Express Cloud Service was announced at Oracle Open World 2016. This service looks like an excellent use case for Oracle Database development purposes as well as setting up a test environment. And even for small to medium sized production situations it looks very promising as you can see in the table below. Especially the cheapest option offers a lot of bang for your bucks. But alas, this service was not as widely available as I expected. The first months it was US-only and you could only figure out by ordering the service and then you would find out on the last page that you should "contact your Oracle sales rep". I sincerely doubt whether he or she could provide you with that service, so I just waited until it would be more generally available. And since a few weeks the Oracle Exadata Express Cloud Service is also available in Europe - I don't know about other parts of the world. A missed chance though that Oracle didn't announce that proper...

OTN Nordic ACE Tour : A Tale of Three Cities

3 days - 3 cities - 6 presentations (4 different ones) My tour started on Monday afternoon when I left my house around 1.30PM to get on the bus to the train station. The 2PM train left exactly on time for the Amsterdam airport. I arrived at Schiphol around 3:30PM, perfectly on time to catch the 5PM flight to Copenhagen. The flight to Copenhagen was very uneventful. From the airport I took the train / metro into the city. I already received an email message from one of my co-travellers, Martin Widlake, who was sitting al alone in a bar downtown. The poor guy. So I rescued him and was briefly after that joined by Sten Vesterli - another ACE Director from the organising country. After just one beer we head over to the restaurant where we met the rest of the board of the Danish Oracle User Group and the other two co-travellers, John King and Ludovico Caldera, for a very nice dinner. As the city was crowded due to another - slightly larger - conference all hotel rooms were either booke...

APEX 5.1 NF : Show Custom Application Icons in the APEX Builder

It just isn't fair. If you install a Packaged Application - and you should because there is a lot to learn from those apps - in your APEX Workspace they all have a cool looking icon. And your own applications, just show up with two characters in a (random?) coloured box. Why can't I have a nice looking icon for my application? In APEX 5.1 you can! Upload an image as a Static Application File . According to the help it should by 64 x 64 pixels, but I noticed it can be larger as well. It should be square though to show up nicely. Don't put it in a (sub)directory, it should be placed in the 'root' folder. Then edit the Application Definition (either via Shared Components > Application Definition Attributes or by clicking on the "Edit Application Attributes" on the Application Builder home screen. Then scroll down until you see the "Icon File Name" property. Enter the name of the uploaded file there - but don't reference #APP_...

It's happening again ... running for the ODTUG Board of Directors 😉

For the third time in a row I'll be running for ODTUG's Board of Directors. But after ending as a runner up twice, I am sure I'm going to make it this time! But not without your help! My campaign statement this year is: I have been attending and presenting at Kscope conferences since 2007. This not only resulted in a vast amount of knowledge, but also - and even more important - a huge number of friends from all over the globe.  I want to see ODTUG grow and spread this community feeling even more!  My experience as an attendee, presenter and content lead has provided the basic foundation to be a director. Next to that, my personality and (global) network will be beneficial to the whole board and organization.  Since March I have served on the Board of Directors in a limited term for a Director who stepped down due to a career change. This has allowed me to have unique insight of all the things that are going on in and around the ODTUG organization. As the...

OTN Nordic ACE Tour

In 1.5 week I'll be travelling to and through the Nordics as one of the speakers during the OTN Nordic ACE Tour . It will be quite a busy schedule! On Monday afternoon I'll be flying to Copenhagen and will meet my fellow travellers for the week during a dinner hosted by the Danish Oracle User Group. On Tuesday I have two sessions during the event: One about APEX JavaScript API's and one about APEX 5.1 .  At the end of the day it's off to the airport to catch the flight to Oslo around 7PM. I foresee an airport dinner here.... Wednesday in Oslo I have even three sessions: About the Universal Theme , APEX 5.1 again and APEX and JET .  At the end of the day it's off to the airport again to catch the flight to Helsinki around 7PM. Probably another airport dinner here .... Thursday morning Heli will take us for a short (but brisk) walk through Helsinki, before the Finnish event starts around noon. Here I have only one session, about APEX 5.1 again. And again ......

Fix Interactive Report headers issue when using a Region Display Selector

When you have multiple Interactive Reports (IR) on your page and use a Region Display Selector to mimic tabs, you might notice some weird behaviour in the IR headings if you switch tabs. The headings are not positioned correctly and you get an extra empty row under the headings. It just looks weird and ugly. But if you resize your browser window, it all looks fine again (until you switch to another tab..) So can we fix this by creating a Dynamic Action that mimics that "browser window resize" event? Yes we can! Create a Dynamic Action that fires on Click of the jQuery selector li.apex-rds-item a . That should fire a JavaScript snippet :  apex.event.trigger(this.triggeringElement, "apexwindowresized"); So now a click on a tab not only switches from one IR to another but also fires that event that will "autofix" the IR headers. A simple solution for an annoying problem. This applies to APEX 5.0, I assume it will be solved in 5.1.

Creating an APEX plugin for an Oracle JET component - Part 2

In my previous blogpost I showed how you can embed an Oracle JET component in your APEX application. Now it is time to make a plugin out of the wisdom we gained doing so. First of all a disclaimer. My intention is to make this plugin and the inner workings as simple as possible. So you can add a lot more functionality, checks etc and therefore add complexity. But this is intended to be as simple as possible. The plugin consists of three parts: a PL/SQL render function, a snippet of JavaScript and a PL/SQL ajax function. The render function is defined as : function render  ( p_region                in  apex_plugin.t_region , p_plugin                in  apex_plugin.t_plugin , p_is_printer_friendly   in  boolean  ) return apex_plugin.t_region_render_result  is   c_region_static_id      constant varchar2(255)  := apex_escap...