Previous
Previous
 
Next
Next

Creating a Plug-in

To create a plug-in:

  1. Navigate to the Plug-ins page. See Accessing Plug-ins.

  2. Click Create.

    The Plug-in Create/Edit page appears.

  3. Under Name:

    1. Name (Required) - Enter name of the plug-in.

    2. Internal Name (Required) - Enter the internal name of the plug-in. This name must be unique within the current application.


      Tip:

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

    3. Type (Required) - Select the type of component that can use this plug-in. Settings under Callbacks and Standard Attributes will be different depending on the plug-in type selected. Refer to following sections for details.

  4. Under Subscription:

    • Reference Master Plug-in From - If you want to base this plug-in on another plug-in in this workspace, select the plug-in from the pop up list. Otherwise, leave the field blank to make this the master copy of this plug-in.

  5. For Settings:

    • File Prefix - Use the default, #PLUGIN_PREFIX#, to reference files that are stored with your plug-in definition in the database. This prefix determines the virtual path the Web server uses to point to the files of the plug-in. For improved performance, you can also store your plug-in files on your Web server and use #IMAGE_PREFIX# or any valid URL to reference them.

  6. Under 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.

    2. Do not validate PL/SQL code (parse PL/SQL code at runtime only) - Check this option if you want to parse the PL/SQL code at runtime only. Otherwise, the code will be parsed when the plug-in is created.

  7. Under Callbacks:

    1. Render Function Name (only available for Region, Item and Dynamic Action type plug-ins) - Enter the name of the PL/SQL function called to render the plug-in.

    2. AJAX Function Name (only available for Region, Item and Dynamic Action type plug-ins) - Enter the name of the PL/SQL function used by the plug-in to load additional data with an AJAX call.

    3. Validation Function Name (only available for Item type plug-ins)- Enter the name of the PL/SQL function the plug-in can use to perform basic validations on the submitted data.

    4. Execute Function Name (only available for Process type plug-ins) - Enter the name of the PL/SQL function called to execute the plug-in.


    Note:

    All Callback function names can reference a function of the anonymous PL/SQL code block, a function within a package or a stand alone function in the database. See item help for further details and examples.

  8. Under Standard Attributes (not available for Process type plug-ins):

    For Dynamic Action type plug-ins, the following descriptions apply when the option is checked:

    1. For Item(s) - The dynamic action supports selection of items as the affected elements.

    2. For Region - The dynamic action supports selection of a region as the affected elements.

    3. For DOM Object - The dynamic action supports selection of DOM Objects as the affected elements.

    4. For jQuery Selector - The dynamic action supports specifying a jQuery selector as the affected elements.

    5. For Triggering Element - The dynamic action supports selection of the triggering element as the affected elements.

    6. For Event Source - The dynamic action supports selection of your event source as the affected elements.

    7. Affected Element Required - The dynamic action requires an affected element to be specified.

    8. Check "Fire on page load" - Defines the default value for the action's Fire on Page Load field.

    9. Has Stop Execution on Error Attribute - The Stop Execution on Error field is available for the action.

    For Item type plug-ins, check the following to enable options as described here:

    1. Is Visible Widget - The widget is visible.

    2. Session State Changeable - The value for an item can be changed in session state. The Is Visible Widget attribute must be checked.

    3. 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.

    4. Has Escape Output 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.

    5. Has Quick Pick Attributes - The item has quick pick attributes. The Is Visible Widget attribute must be checked.

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

    7. 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.

    8. 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.

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

    10. Has Width Attributes - The item width can be controlled.

    11. Has Height Attribute - The item height can be controlled.

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

    13. Has Encrypt Session State Attribute - When editing the item, the Store value encrypted in session state displays under the Security region.

    14. Has List of Values - The item has an associated list of values. The Is Visible Widget attribute must be checked.

    15. 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.

    16. 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.

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

    For Region type plug-ins, check the following to enable options as described here:

    1. Region Source is SQL Statement - The region source is a SQL Statement. When checked, a minimum and a maximum number of columns the query can return can be specified and SQL Examples display to help the user.

    2. Region Source is Plain Text - The region source is plain text.

    3. Region Source Required - If region source is a SQL Statement, this attribute makes this a required value.

  9. For 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 will never be displayed when the application is running.

    To learn more about each option, see item Help.

  12. Click Create.

    Now that the plug-in is created, you can specify additional custom attributes, upload files such as image, CSS and JavaScript files to associate with your plug-in and add events. See "Adding Custom Attributes to a Plug-in", "Uploading Files to Associate with a Plug-in", and "Adding Events to a Plug-in".