19.2.2 Creating Plug-ins

Create plug-ins by navigating to Shared Components and running the Create Plug-in Wizard.

19.2.2.1 Creating a Plug-in from Scratch

Create a plug-in from scratch by running the Create Plug-in Wizard

Tip:

To learn more about an attributes described in this section see field-level Help.

To create a plug-in from scratch:

  1. Navigate to the Shared Components page:
    1. On the Workspace home page, click App Builder.
    2. Select an application.
    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, click Plug-ins.
  3. Click Create.

    The Create Plug-in wizard appears.

  4. Create Plug-in - Select From Scratch and click Next.
  5. Name:
    1. Name - Enter name of the plug-in.
    2. Internal Name - Enter the internal name of the plug-in. This name must be unique within the current application.

      Note:

      To insure the internal name is a globally unique name worldwide, Oracle recommends that your organization domain name be used as a prefix to internal plug-in names. For example, a domain name of example.com.com prefixed to a plug-in named Slider, would result in an internal name of COM.EXAMPLE.SLIDER.

    3. Type - Select the type of component that can use this plug-in. Options include:
      • Authentication Scheme Type - Used to establish each user's identity before accessing an application.
      • Authorization Scheme Type - Checks if a user can access a page, process, or component.

      • Dynamic Actions - Adds new actions and/or functionality that can by called dynamically on the client-side.

      • Item - Adds new item types into APEX.

      • Process - Adds an application and/or page processes.

      • REST Data Source - Used for certain REST Data Sources without further configuration or programming.

      • Template Component - Plug-ins based on HTML templates which support Template Directives. See Using Template Directives.

        Enables support for adding new region types to APEX which are not based on PL/SQL. These new region types can be used as regions, as reports, or as columns in interactive reports.

      • Region Plug-ins -Plug-in used to add new region types into APEX.

      Depending upon the plug-in type you select, the UI changes. For example, the options that display under Callbacks and Standard Attributes may differ.

    4. Category - Only displays if the selected type is Dynamic Action. Select the category the plug-in is displayed under on the user interface.
  6. Source:
    1. PL/SQL Code - Enter a PL/SQL anonymous block of code that contains the procedures for rendering, validating, executing, and performing Ajax callbacks for this plug-in. For performance reasons you can also store this code in a PL/SQL package in the database.
    2. Do not validate PL/SQL code (parse PL/SQL code at runtime only) - Select this option to parse the PL/SQL code at runtime only. Otherwise, the code is parsed when the plug-in is created.
  7. Callbacks - Configure that appropriate attributes. The attributes that display depend upon the plug-in type. To learn more about an attribute and view examples, see field-level Help.

    Tip:

    All Callback function names can reference a function of the anonymous PL/SQL code block, a function within a package or a standalone function in the database.

  8. Standard Attributes - Select the attributes that apply to this plug-in. Standard Attributes do not display for some plug-ins.

    To learn more about Standard Attributes that apply only to Item type plug-ins, see Standard Attributes for Item Type Plug-ins.

  9. Information:
    1. Version - Enter a string to identify the plug-in version.
    2. About URL - Enter a URL to the plug-in authors home page or to additional information about the plug-in.
  10. For Help Text, enter help text used by the user to understand how the plug-in works.
  11. For Comments, enter comments and notes that never display when the application is running.

    To learn more about each option, see field-level Help.

  12. Click Create Plug-in.

    Now that the plug-in is created, you can edit it to specify additional custom attributes, upload files such as image, CSS, and JavaScript files to associate with your plug-in, and add events.

19.2.2.2 Standard Attributes for Item Type Plug-ins

Review the Types supported for Custom Attributes.

Item Type Standard Attributes Description

Is Visible Widget

The widget is visible.

Standard Form Element

The widget renders as a HTML form element (for example, input, select or textarea). If not checked, APEX_PLUGIN_UTIL.GET_ELEMENT_ATTRIBUTES will automatically add ARIA-LABELLEDBY to allow the non-standard form element to be labeled appropriately, so as to be accessible to screen readers.

Note: This relies on the #LABEL_ID# substitution being defined in the item's corresponding label template. The Is Visible Widget attribute must also be checked

Session State Changeable

The value for an item can be changed in session state. The Is Visible Widget attribute must be checked.

Has Read Only Attribute

The user can specify a Read Only condition for the item. The Is Visible Widget attribute must be checked for this attribute to be enabled

Has Escape Special Characters Attribute

The item has the Escape special characters field in the Security section when the item is edited. The Is Visible Widget attribute must be checked.

Has Quick Pick Attributes

The item has quick pick attributes. The Is Visible Widget attribute must be checked.

Has Source Attributes

The item has source related attributes such as Source Used, Source Type, and Format Mask.

Format Mask Date Only

For items that handle date information, the Format Mask field popup restricts the date selections by displaying date values to select from. The Has Source Attributes must be checked.

Format Mask Number Only

For items that handle numeric information, the Format Mask field popup restricts the numeric selections by displaying numeric values to select from.

Has Element Attributes

The item has element attributes such as Horizontal/Vertical Alignment, HTML Form Element Attributes, and Pre/Post Element Text.

Has Width Attributes

The item width can be controlled.

Has Height Attribute

The item height can be controlled.

Has Element Option Attribute

The item allows specification of additional option attributes when rendering multi-selection elements such as radio groups of check boxes.

Has Placeholder Attribute

The item supports the specification of placeholder text, which gets displayed in the element.

Has Encrypt Session State Attribute

When editing the item, the Store value encrypted in session state displays under the Security region.

Has List of Values

The item has an associated list of values. The Is Visible Widget attribute must be checked.

List of Values Required

For items that handle lists of values, a list of values must be defined. The Has List of Values attribute must be checked.

Has LOV Display Null Attributes

The item is associated with a list of values that is allowed to include null values. The Has List of Values attribute must be checked.

Has Cascading LOV Attributes

The item has cascading LOV related attributes. The Has List of Values attribute must be checked.

Join LOV for Column Display

The item can be a part of a Join statement for the LOV source. The Has List of Values attribute must be checked.

Has Filter

Controls if the Page Designer shows the Column Filter - Enabled attribute of an interactive grid column.

Has Link

Controls if the Page Designer shows the Link - Target attribute of an interactive grid column.

Has "'Initialization JavaScript Code" Attribute

Component configuration can be controlled by a provided JavaScript function.

Session State Supports CLOB

Controls if the Page Designer will show Session State Group for the particular item.

19.2.2.3 Copying a Plug-in

Create a plug-in by copying an existing plug-in from another application.

Tip:

To learn more about plug-in attributes, see field-level Help.

To copy a plug-in:

  1. Navigate to the Shared Components page:
    1. On the Workspace home page, click App Builder.
    2. Select an application.
    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Other Components, click Plug-ins.
  3. Click Create.

    The Create Plug-in wizard appears.

  4. Create Plug-in - Select As a Copy of an Existing Plug-in and click Next.
  5. Copy From:
    1. Copy From Application - Select an application from which to copy plug-ins.
    2. Theme - Identify the theme from which you wish to copy templates.
    3. Click Next.
  6. Copy:
    1. Identify the Plug-in to be copied and select the copy option. Options include:
      • Yes - Copy the Plug-in.
      • No - Do not copy this Plug-in.
      • Copy and Subscribe - Subscribingto a Plug-in puts a copy of it in your application and sets the plugin master reference.
  7. Click Copy Plug-ins.

    Now that the plug-in is created, you can edit it to specify additional custom attributes, upload files such as image, CSS, and JavaScript files to associate with your plug-in, and add events.