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 worse) while you…
Recent posts

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 can!
First i…

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 have heard of Docker but really have hardly a clue what …

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 about "Finally Javas…

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 (nor delete). You can c…

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. the "…

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 of 23Gb. But my se…

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, Code and Desc…