Oracle® HTML DB
Release 2.0
  Go To Table Of Contents
Contents

Previous
Previous
Next
Next
 

Using Shortcuts

By using shortcuts you can 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.

Topics:

About Shortcut Types

When you create a new shortcut, you must specify the type of shortcut you want to create. Oracle HTML DB supports the following 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

Text with JavaScript Escaped Single Quotes

Use this type of shortcut to reference a shortcut inside of a JavaScript literal string. This shortcut defines a text string. When the shortcut is referenced, it escapes the single quotation marks required for JavaScript.

Message

Use this type of shortcut to reference a translatable message at run time. Note that since this shortcut does not have a shortcut body, the name of the shortcut must match the corresponding message name. At run time, the name of the shortcut expands to the text of the translatable message for the current language.

Message with JavaScript Escaped Single Quotes

Use this type of shortcut to reference a shortcut inside of JavaScript literal string and reference a translatable message at run time.

Defining Shortcuts

Before you can incorporate a shortcut in your application, you must define it and add it to the Shortcuts repository. You reference new shortcuts using the following syntax:

"MY_SHORTCUT"

Note that the shortcut name must be capitalized and enclosed in quotation marks.

To define a new shortcut:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. When Application Builder appears, click Shared Components.

  5. Under User Interface, select Shortcuts.

  6. Click Create.

  7. Select one of the following creation methods:

    • From Scratch

    • As a Copy of an Existing Shortcut

  8. Follow the on-screen instructions.

New shortcuts are added to the Shortcut repository and are available for use within the following locations:

About the Shortcuts Page

Once you create a shortcut, it appears on the Shortcuts page. You control how the page displays by making a selection from the View list. Available options include:

  • Icons (the default) displays each shortcut as a large icon. To edit a shortcut, click the appropriate icon.

  • Details displays each shortcut as a line in a report. To edit a shortcut, click the name.

Accessing Shortcut Reports

Application Builder includes a number of reports designed to help you better manage LOVs.

To access shortcut reports:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. When Application Builder appears, click Shared Components.

  5. Under User Interface, select Shortcuts.

  6. Click one of the following buttons:

    • Subscription

    • History


    Note:

    The Subscription and History buttons only appear after you create a shortcut.

Subscribed Shortcuts

Click Subscription to display the Subscribed Shortcuts page. This page displays all subscribed shortcuts in your application.

Shortcut History

Click History to display the Shortcut History page. This page displays a history of recently changed shortcuts by date.