Skip to main content

Usage Guide

Adding APEX Office Edit to an existing application

This section describes the first steps to setting up an instance of the APEX Office Edit plug-in. If any plug-in attribute's purpose needs to be clarified, please read the help text available in the Oracle APEX page designer. This implementation uses the default tables that are provided with APEX Office Edit.

Create a new page

  1. Create a new empty page

image

Create the APEX Office Edit region

  1. Create a new region
  2. Set Identification \ Title to APEX Office Edit on default table
  3. Change Identification \ Type to UC - APEX Office Edit (AOE) [Plug-in]

image

Create an APEX item to store the document id

  1. Create a page item
  2. Set Identification \ Name to P3_DOCUMENT_ID (might differ depending on your page id)
  3. Change Type to Hidden
  4. Set Settings \ Value Protected to No

image

Configuration

  1. Go to the APEX Office Edit on default table region and select Attributes
  2. Set Item Containing Primary Key Value to P3_DOCUMENT_ID (might differ depending on your page id)
  3. Save and run the page

image

Testing

You should now be able to start creating your first document. Clicking on the document icon creates a blank document of the selected type.

image

image

Loading documents into APEX Office Edit

This section outlines the first steps to load documents into APEX Office Edit. AOE's state is based on the APEX Session State for any page items defined as primary key(s). If the given item(s) is/are NULL, AOE shows a panel allowing the end-user to create a new document. To load a document into AOE, the item(s) must not be NULL, and the plug-in configuration must be valid.

The instructions presented below are a continuation of Adding APEX Office Edit to an existing application.

Create a classic report that shows all created files

  1. Create a new page region
  2. Set Identification \ Title to All files
  3. Set Identification \ Type to Classic Report
  4. Set Source \ Table Name to AOE_DEFAULT_FILES
  5. Select the CONTENT column in the All files \ Columns tree
  6. Set Identification \ Type to Hidden Column

image

  1. Select the FILENAME column in All files \ Columns tree

  2. Set Identification \ Type to Link

    image

  3. Click the No Link Defined button in Link \ Target

  4. Set Target \ Type to URL

  5. Set URL to the following JavaScript:

    javascript: apex.event.trigger(document, 'loaddocument', #ID#);

    image

  6. Click the OK button

  7. Go to the next step to create a dynamic action

Create a load file dynamic action

  1. Create a new dynamic action
  2. Set Identification \ Name to Load document
  3. Set When \ Event to Custom
  4. Set When \ Custom Event to loaddocument
  5. Set When \ Selection Type to JavaScript Expression
  6. Set When \ JavaScript Expression to document

image

Define the true actions

  1. Select the default Show action

  2. Set Identification \ Name to Set Value

  3. Set Identification \ Action to Set Value

  4. Set Settings \ Set Type to JavaScript Expression

  5. Set Settings \ JavaScript Expression to this.data

  6. Set Affected Elements \ Item(s) to P3_DOCUMENT_ID (might differ depending on your page id)

  7. Under Execution Options switch off the Fire on Initialization toggle.

    image

  8. Create a new true action

  9. Set Identification \ Name to Refresh

  10. Set Identification \ Action to Refresh

  11. Set Affected Elements \ Selection Type to Region

  12. Set Affected Elements \ Region to APEX Office Edit on default table

    image

  13. Move the All files region above the APEX Office Edit on default table region

  14. Save and run the page

The filename column contains links. Clicking on a link will force APEX Office Edit to load the selected document by setting the primary key item and refreshing the AOE region.

image