Skip to main content

Using process plug-in

In Oracle APEX 19.2, the Rich Text Editor Pro offers seamless integration with the supporting process plug-in, enabling developers to efficiently manage CLOB values in the database. This feature empowers developers to store, retrieve, and update rich text documents exceeding the VARCHAR2 limitation (32,767 characters), providing enhanced flexibility and scalability in document management.

In this guidelines, developers are guided through the process of implementing plug-in processes loading, inserting and updating documents in the database.

Prerequisites

Before implementing the plug-in please read the implementation prerequisites described in parent document.

Create report page linked with modal page

Click Create Page button.

image-20240208115010501

In modal Create a Page select Form and click Next button.

image-20240208115104469

In modal Create Page select Report with Form and click Next button.

image-20240208115158886

In APEX wizard Create Report with Form (Page attributes):

  1. Set Report Type to Interactive Report
  2. Set Report Page Number to 6
  3. Set Report Page Name to Process plug-in - report
  4. Set Form Page Number to 7
  5. Set Form Page Name to Process plug-in - modal
  6. Set Form Page Mode to Modal Dialog
  7. Click Next button

image-20240208115320944

In wizard Create Report with Form (Navigation Menu):

  1. Set Navigation Preference to Create a new navigation menu entry
  2. Set New Navigation Menu Entry to Process plug-in
  3. Click Next button

image-20240208115441990

In wizard Create Report with Form (Data Source):

  1. Set Data Source to Local Database
  2. Set Source Type to Table
  3. Set Table / View Name to UC_FROALA_SAMPLE_CLOBS
  4. In Select Columns to be shown in the report select ID, DESCRIPTION and CLOB_CONTENT

image-20240208115640005

In wizard Create Report with Form (Form page):

  1. In Select Columns to be shown in the form select ID, DESCRIPTION and CLOB_CONTENT
  2. Set Primary Key Column to ID (Number)
  3. Click Create button

image-20240208115727901

New pages are created with all required components. Navigate to page 6 Process plug-in - report and hide column CLOB_CONTENT so it won't raise interactive report error when CLOB value exceeds VARCHAR2 limitation. Follow the following steps:

  1. Select Report 1
  2. Expand Columns
  3. Select column CLOB_CONTENT
  4. Set Identification \ Type to Hidden Column

image-20240208115920806

Remove form components

info

Removed processes in this step are native form component processes loading, creating, updating and deleting rows in the database table. These components were created by APEX wizard and they will be replaced with page processes implementing the supporting process plug-in.

Navigate to page 7 Process plug-in - modal, and

  1. select before header process and using DELETE key remove these processes.
  2. select processing process and using DELETE key remove these processes.
  3. select region Process plug-in - modal and change Type to Static Content

image-20240208120036548

Enable page item plug-in

about this step

Enabling plug-in uploading images is optional, not uploaded images remain in a document as is without modyfing document HTML.

Navigate to page 7 Process plug-in - modal and update page item P7_CLOB_CONTENT by following these steps:

  1. Set Identification \ Type to UC - Rich Text Editor Pro [Plug-in].
  2. Set Appearance \ Template to Optional \ Above
  3. Set Settings \ Upload Image(s) on Request(s) to SAVE,CREATE

image-20240208120423884

Page processes

about this step

This guidelines showcase the supporting process plug-in loading, inserting and updating documents in the database using a developer's specific PL/SQL Code. The implementation guidelines for native form showcase the supporting process plug-in using table specification.

Before header - load a document

Create a new Before Header page process named Load rich text document and:

  1. Set Identification \ Type to UC - Rich Text Editor Pro (Process) [Plug-in]
  2. Set Settings \ Type to Load CLOB (Function Body returning CLOB)
  3. Set Settings \ Item to P7_CLOB_CONTENT
  4. Set Settings \ Function Body returning CLOB
  5. Set Success Message to Rich text document &P7_ID. loaded.
  6. Set Server-side Condition \ Type to Item is NOT NULL
  7. Set Server-side Condition \ Item to P7_ID
  8. Save page changes

image-20240208123021827

Processing - create a document

Create a new Processing process named Create rich text document and:

  1. Set Identification \ Type to UC - Rich Text Editor Pro (Process) [Plug-in]
  2. Set Settings \ Type to Update CLOB (PL/SQL Code)
  3. Set Settings \ Item to P7_CLOB_CONTENT
  4. Set Settings \ PL/SQL Code
  5. Set Success Message to Rich text document &P3_ID. updated.
  6. Set erver-side Condition \ Type to Request = Value
  7. Set erver-side Condition \ Value to CREATE
  8. Save page changes

image-20240208125510531

Processing - update a document

Create a new Processing process named Update rich text document and:

  1. Set Identification \ Type to UC - Rich Text Editor Pro (Process) [Plug-in]
  2. Set Settings \ Type to Update CLOB (PL/SQL Code)
  3. Set Settings \ Item to P7_CLOB_CONTENT
  4. Set Settings \ PL/SQL Code
  5. Set Success Message to Rich text document &P3_ID. updated.
  6. Set Server-side Condition \ Type to Request = Value
  7. Set Server-side Condition \ Value to SAVE
  8. Save page changes

image-20240208125624106

Processing - delete a document

Create a new Processing process named Delete CLOB in the database and

  1. Set Identification \ Type to PL/SQL Code
  2. Set Source \ PL/SQL Code
  3. Set Success Message to Rich text document (&P7_ID.) removed.
  4. Set Server-side Condition \ When Button Pressed to DELETE

image-20240208125729762

Update Close dialog execution sequence so it's the last process to be executed.

image-20240208125319264

Test it

This simple and easy to implement instruction showcased how easy is utilizing the supporting process plug-in to load, create and update rich text documents.

To test the implementation using interactive report and modal page implementing the plug-in run page 6 - Process plug-in - report.

image-20240604173152061

Test the instruction in the sample application

The plug-in sample application showcase this instructions implemention in example page Handle CLOB using the plug-in PL/SQL API.