Using Shortcuts


Using Shortcuts ORACLE APEX


What is a Shortcut?

Using shortcuts enables you to avoid repetitive coding of HTML or PL/SQL functions. You can use a shortcut to define a page control such as a button, HTML text, a PL/SQL procedure, or HTML. Once defined, you can invoke a shortcut using specific syntax unique to the location in which the shortcut is used. Shortcuts can be referenced many times, thus reducing code redundancy.


Shortcut Types:=
  • PL/SQL Function Body
  • HTML Text
  • HTML Text with Escaped Special Characters
  • Image
  • Text with JavaScript Escaped Single Quotes
  • Message
  • Message with JavaScript Escaped Special Quotes

Creating a Shortcut:=

  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, select Shortcuts.
  3. Click Create.
  4. For Create Shortcut, select From Scratch and click Next.
  5. On Shortcut Attributes:
    1. Name - Enter the name by which the shortcut will be referenced.
    2. Type - Select a shortcut type. Options include:
      • PL/SQL Function Body
      • HTML Text
      • HTML Text with Escaped Special Characters
      • Image
      • Text with JavaScript Escaped Single Quotes
      • Message
      • Message with JavaScript Escaped Special Quotes
    3. Shortcut - Enter the text of the shortcut. The shortcut must be less then 30,000 characters in length.
    4. Error Text - Enter the text to display if an error should occur during the processing of a shortcut.
    5. Build Option - Select a build option for this component.
  6. Click Create.
    New shortcuts are added to the Shortcuts page (also referred to as the Shortcut repository).

Calling Shortcut in apex page:

"MY_SHORTCUT"





















































Post a Comment

0 Comments