Custom attributes
Application
The APEX Office Edit plug-in application attributes can be set via Shared Components \ Component Settings \ UC - APEX Office Edit (AOE).
Application component settings are applied to all instances of APEX Office Edit in an application. The component settings AOE Server URL and URL to RESTful Service module can be overridden per AOE instance using the region attribute Settings \ Override Component Settings.
API Key
Type | Required | Dependent on |
---|---|---|
Text | No | None |
Enter a valid APEX Office Edit API key. The API key can be obtained on the APEX Office Edit portal: https://www.apexofficeedit.com/ords/uc/r/aoe_portal/
Default Document Filename
Type | Required | Dependent on |
---|---|---|
Text | Yes | None |
Specify the document's default name. The default filename is used when AOE creates a new file.
The attribute supports APEX substitution variables (e.g., &APP_AOE_DEFAULT_FILENAME.
) which can be used to dynamically set the filename from the session state.
AOE Server URL
Type | Required | Dependent on |
---|---|---|
Text | Yes | None |
Specify the URL where the AOE server component is running.
The default value is https://api.apexofficeedit.com/
URL to RESTful Service module
AOE has a default ORDS RESTful service module named APEX Office Edit. The URL must be copied from SQL Workshop \ RESTful Services \ Module Definition, for example, http://www.united-codes.com/ords/hr/aoe/
.
It is strongly recommended to use the unmodified RESTful service that is delivered with AOE. A valid URL to the ORDS RESTful service module should refer to a RESTful service module with the following handlers:
URI Template | Method | Operation |
---|---|---|
files/:fileid | GET | get document information |
files/:fileid | POST | save document as, rename a document |
files/:fileid/contents | GET | get document content |
files/:fileid/contents | POST | save changes |
files/create/:type | GET | create a new document |
files/knockknock | GET | check if RESTful service is available |
files/meta/ | GET | get document meta-data after loading a document |
Component
All the plug-in region attributes available in the Oracle APEX page designer are listed and described below.
Allowed File Types
Type | Required | Dependent on |
---|---|---|
Checkbox | Yes | None |
Use the following document types to restrict the kinds of documents that the end-user can create and open.
Available options:
- Microsoft Word
- Microsoft Excel
- Microsoft PowerPoint
- Open Document Text
- Open Document Spreadsheet
- Open Document Presentation
- Open Document Draw
Settings
Type | Required | Dependent on |
---|---|---|
Checkbox | No | None |
Use the following options to set the plug-in configuration.
Disable Creating Files
Checked | Not Checked |
---|---|
Creating a new file is disabled | Creating a new file is enabled |
Disable Editor Messages
Checked | Not Checked |
---|---|
Only the editor's error messages are shown. All success messages are ignored and not shown to the end-user. | all messages including success messages are displayed within the editor and the end-user has to close the prompts manually. For example, when a document has been successfully updated, the editor shows the message Successfully uploaded file. |
Disable Exporting
The editor supports exporting a currently opened document to different types - for example, Microsoft Word documents can be exported to PDF, RTF, DOC, and ePUB.
This option prohibits the end-user from exporting a document using the editor's toolbar.
Checked | Not Checked |
---|---|
Exporting enabled | Exporting disabled |
Disable Printing
Printing should be only enabled when an APEX application using AOE is in the same origin as the AOE host server files. Otherwise, an attempt to print will raise cross origin error.
Checked | Not Checked |
---|---|
The editor print button is not displayed | The editor print button is displayed only when the APEX application and AOE server files are in the same origin |
Disable Renaming
Checked | Not Checked |
---|---|
Renaming a document using the editor filename input in the toolbar is disabled. | Renaming a document using the editor filename input in the toolbar is enabled. |
Disable Save As
Checked | Not Checked |
---|---|
Saving a currently opened document as a new file is disabled | Saving a currently opened document as a new file is disabled |
Override Component Settings
When selected, the AOE application components settings AOE Server URL and URL to RESTful Service module can be overridden on the region level in the page designer. Otherwise, the attributes defined in the plug-in component settings are used by default.
AOE Server URL (attribute)
Type | Required | Dependent on |
---|---|---|
Text | Yes | Settings \ Override Component Settings is checked |
When provided at the page designer level, it overrides the Custom attributes \ Application \ AOE Server-Side URL value. See Custom attributes \ Application \ AOE Server-Side URL for more information.
URL to RESTful Service module (attribute)
Type | Required | Dependent on |
---|---|---|
Text | Yes | Settings \ Override Component Settings is checked |
When provided on the page designer level, it overrides the Custom attributes \ Application \ URL to RESTful Service module value. See Custom attributes \ Application \ URL to RESTful Service module for more information.
Source
The attribute defines how the AOE maintains documents. Depending on the attribute value, there are different implementations.
Default Table
When selected, AOE maintains documents using the AOE_DEFAULT_FILES
table.
The default table implementation supports built-in document versioning using the AOE_DEFAULT_VERSIONS
table. Versioning must be enabled using the PL/SQL variable AOE_PLUGIN.g_default_versioning
in the Initialization PL/SQL Code attribute.
The table must be accessible by the AOE RESTful Service module.
Custom Table
When selected, AOE maintains documents using a table specification provided by a developer via the AOE region attributes. A developer has to provide a table specification, including:
- Table name
- Primary key(s) column(s)
- Column name for a document BLOB content
- Column name for a document filename
- Column name for a document MIME Type
- Column name for a document's last modification time
- Column name for a document's current version (optional)
- Column name for a document owner
Important: the table must be accessible by the plug-in RESTful Service module.
Custom PL/SQL
When selected, AOE maintains documents using PL/SQL code provided by a developer. A developer has to create a package containing the required procedures for handling documents operations, such as:
AOE_PLUGIN.g_doc_getfileinfo
- fetching a document meta-dataAOE_PLUGIN.g_doc_create
- saving (creating) a new file based on an empty template BLOB of the requested typeAOE_PLUGIN.g_doc_update
- updating a documentAOE_PLUGIN.g_doc_saveas
- saving a document as a new fileAOE_PLUGIN.g_doc_rename
- renaming an existing document
The package name has to be entered into the Custom PL/SQL Package Name attribute, and procedure names must be provided using variables in the Initialization PL/SQL Code attribute. Learn more in Custom Attributes \ Initialization PL/SQL Code
The package must be accessible by the AOE RESTful Service module.
Table Name
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A custom table name where documents are stored. The table name can be prefixed with #OWNER#
to reference the current parsing schema, ie. #OWNER#.AOE_DEFAULT_FILES.
A custom table must have (at least) the following types of columns:
Description | Type |
---|---|
Column storing a document's primary key | VARCHAR2 | NUMBER |
Column storing a document's filename | VARCHAR2 |
Column storing a document's owner (an application end-user username) | VARCHAR2 |
Column storing a document's MIME-type | VARCHAR2 |
Column storing a document's current version | NUMBER |
Column storing a document's content | BLOB |
Column storing a document's last modification time | TIMESTAMP(6) |
Multiple Primary Keys | |
A custom table can use multiple primary keys to identify a document. Comma-delimited column names must be set using the Primary Key(s) Column(s) attribute. |
Primary Key(s) Column(s)
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
Specify a comma-delimited list of column names used as primary keys for a document in the custom table.
Item(s) Containing Primary Key(s) Value(s)
Type | Required | Dependent on |
---|---|---|
Page Item(s) | Yes | None |
A given APEX page item(s) is (are) used to identify a document to load from the database table. When any APEX item specified as the primary key is set to NULL
, the AOE Editor shows the document creation panel or read-only panel, depending on the plug-in attributes.
Content Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is BLOB
and stores a document's file contents.
Filename Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's filename (including the file extension).
MIME Type Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's file MIME type.