
Barry's IT Development Blog
178 FOLLOWERS
Hi! I'm Barry, an Oracle Apex Software Engineer. I hate reading manuals. I find most of my answers on forum posts and blogs. But there's a lot of incorrect and outdated information out there. In my blogs, I share all the latest information about Oracle apex. This is what worked for me and I'm sure it will be of great benefit to you too!
Barry's IT Development Blog
8M ago
Requirement
React to a Javascript call to apex.server.process
In my example, at the end I'll call an inline dialogue after processing.
Solution
Create a Javascript dynamic action. In my example it is initiated with a button.
Javascript Code.
var $wP;
var displayError = function(error) {
console.error("Promise is rejected:", error);
};
var call_block1 = function() {
$wP = apex.widget.waitPopup();
return "End of Block 1";
};
var call_block2 = async function() {
return apex.server.process( "MY_CALLBACK", {pageItems: "#P_TEXT_IN"}, {dat ..read more
Barry's IT Development Blog
9M ago
Requirement
Because we needed to use an older version of CKEDITOR, it was necessary to load the text editor as a region rather than an item. Similar to what has been explained here:
https://content.dsp.co.uk/apex/implementing-ckeditor-5-in-apex-19
But now the requirement was to inject text into the editor on demand. That injected text itself was on the database. The text would be selected from a report. The size of the region could easily be over 32k meaning that workarounds were required to overcome current (Apex 21 and below) limitations.
I tried several plugins but found them unr ..read more
Barry's IT Development Blog
1y ago
Problem
You have a button which calls a different modal page.
Even though you specify the target page item and source value, the modal does not receive the parameter.
Solution
Create a hidden item to store a URL. Mine is called P5_ATTACHMENT_URL
The parameter that I want to pass is P5_MESSAGE_ID.
Create a dynamic action on change of the value that you want to pass.
(If you have more than one value you will need to repeat these steps)
You want to set the value with this code, don't forget NOT to escape special characters otherwise the link will not make sense.
Here is my code ..read more
Barry's IT Development Blog
1y ago
Requirement
You want to populate a rich text item from a value (Clob) stored in the DB.
Settings defaults and source doesn't do anything, this worked for me.
Solution
Assume my item is
Add this application process. Mine is called FETCH_SIGNATURE and its processing point is Ajax Callback. Replace the SQL select at the beginning with your table/column/parameter.
DECLARE
l_clob CLOB;
l_file BLOB;
l_dest_offset PLS_INTEGER := 1;
l_src_offset PLS_INTEGER := 1;
l_lang_ctx PLS_INTEG ..read more
Barry's IT Development Blog
1y ago
Requirement
Rich Text Editor should be as large as possible. But even with template attributes set to Stretched, Extra large, it isn't big.
Solution
Two pieces of code. Assuming your item is called P5_BODY_RICH:
1. Put this code into the JavaScript Initialization Code property of your Rich Text Editor item.
This code will resize the item. Many other configuration options can be set as well, such as toolbars, colours etc. Take a look at this doc Class Config (CKEDITOR.config) - CKEditor 4 API docs
function ( configObject ) {
configObject.width   ..read more
Barry's IT Development Blog
1y ago
Requirement
You've spotted some PL/SQL code that looks encrypted.
The code is in an installation script or you have retrieved it using dbms_metadata.get_ddl.
Solution
This isn't encrypted, merely masked using a technique called wrapping. This is done to prevent anyone from displaying that text with the static data dictionary views.
You can use tools like Unwrap It!.
Paste the entire code, including the create/replace statement into the box.
Result
I've masked the result obviously.
Acknowledgement
Encrypt decrypt PL SQL Packages in oracle - Stack Overflow ..read more
Barry's IT Development Blog
1y ago
Requirement
You have an image in a table and want to display it on a page.
There are a number of options.
1. Creating an Ajax callback application process and using a URL: to fetch it. e.g <img src="f?p=&APP_ID.:0:&APP_SESSION.:APPLICATION_PROCESS=GETIMAGE:::IMAGE_ID:4">
2. Creating a display image item type with source SQL Blob column.
..or if these don't work and sometimes they don't for no rhyme or reason, here is a method that looks obscure but worked beautifully for me.
Method
Create a classic report with the following query, mine was on page 9:
select '< ..read more
Barry's IT Development Blog
1y ago
Problem
I had this data in a BLOB column. I knew that it was a spreadsheet but couldn't understand the format stored.
Solution
Turns out that this is a base64 encoded string. The header is for information purposes, but if you copy the data string, starting "UEsDBBQABgAI...." to this nifty utilty, it displays the spreadsheet perfectly.
In other words, from a pure data perspective, all we're interested in is that long string of data.
The approach is thus:
1. Create a CLOB from a BLOB. (Yours might already be in CLOB format)
2. Strip out the header, so that our clob just starts with ..read more
Barry's IT Development Blog
1y ago
Requirement
This is a simple way to add formatting to the nav bar. In this case I'm dynamically adding a number to one of the labels.
Solution
Create an application item.
  ..read more
Barry's IT Development Blog
1y ago
Requirement
To disable a database job.
Note this is the old style job, since replaced with scheduler APIs.
Solution
select *
from dba_jobs;
Find the ID of the job that you want. Example 23.
begin dbms_job.broken(23, true);commit;end;
Select again, you'll see the broken flag set.
select *
from dba_jobs;
Acknowledgement
https://stackoverflow.com/questions/14148375/how-to-enable-disable-oracle-job-using-job-id
  ..read more