7.4 Managing Page Attributes in Page Designer

Page attributes control basic information and functionality for a given page, including the page name or title, header and footer text, navigation menus, inclusion of page-level JavaScript or CSS files, error handling, and the selected authorization scheme.

7.4.1 Editing Page Attributes in the Page Designer

To edit page attributes in the Page Designer:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In either the Rendering tab or the Layout tab, select the page name.

    The Property Editor displays the Page attributes.

    Property Editor organizes attributes into functional groups. Use the following icons to expand or collapse these groups:

    • Show Common - Displays only those attributes for which the default value has changed or are commonly edited.

    • Show All - Displays all attributes (default).

    • Collapse All - Collapses functional group so only the group heading displays.

    • Expand All - Expands functional groups so all attributes displays.

    • Go to Group - Navigate to and expand, if necessary, the selected group.

  3. To search for a group or an attribute, enter a keyword in the Filter Properties field.

    The groups and attributes containing the term appear.

  4. Edit the appropriate attributes in the Property Editor.

    Edited attributes display a blue marker to the left of the attribute name until the page is saved.

    Note:

    To learn more about an attribute, see field-level Help.

  5. To save your changes, click Save or Save and Run Page.

7.4.2 Incorporating JavaScript Using Page Designer

You can include JavaScript on a page by editing the attributes in the JavaScript group. This is a good approach for functions that are very specific to a page and a convenient way to test a function before you include it in a .js file.

In the following example, adding the code would make the test function accessible from anywhere on the current page.

To add JavaScript code to the JavaScript attribute:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the page name.
    The Property Editor displays the Page attributes.
  3. Click the Collapse All icon and then locate and expand JavaScript.
  4. Under JavaScript, enter code into the following attributes:

    Tip:

    To learn more about an attribute and view examples, select the attribute in the Property Editor and click the Help tab in the central pane.

    • File URLs - Enter JavaScript file URLs for code to be loaded on this page. Each URL has to be written into a new line. If you provide a minified version of your file you can use the substitution string #MIN# to include .min or #MIN_DIRECTORY# to include minified/ in your file URL for a regular page view and an empty string if the page is viewed in debug mode. You also have access to the substitution string #APP_VERSION# if you want to include the application's version in the file URL.

    • Function and Global Variable Declaration - Enter JavaScript code such as functions or global variable declarations referenced on this page. If the same JavaScript is required on multiple pages, consider putting the code into an external JavaScript file to avoid duplication and to leverage browser caching of static files.

      Code you enter here replaces the #PAGE_JAVASCRIPT# substitution string in the page template.

      Tip:

      Note: Do not to include opening or closing script tags. Just include the JavaScript code.

      To reference a shortcut, use:

      "SHORTCUTNAME"
      
    • Execute When Page Loads - Enter JavaScript code to execute when the page loads. The code is executed after the JavaScript code generated by Oracle Application Express.

    For example, adding the following to the Function and Global Variable Declaration attribute would test a function accessible from anywhere on the current page.

      function test(){
        alert('This is a test.');
      }
    
  5. Click Save.

7.4.3 Configuring Rejoin Sessions in Page Designer

The Rejoin Sessions attribute controls support for joining existing sessions (similar to deep linking). Technically, this attribute determines whether URLs to this application contain session IDs.

Warning:

Enabling rejoin sessions may expose your application to possible security breaches, as it can enable attackers to take over existing end user sessions. To learn more, see "About Rejoin Sessions."

To use Rejoin Sessions, administrators must enable Rejoin Sessions at the instance-level. A more restrictive value of Rejoin Sessions at the instance-level overrides application and page settings.

To configure Rejoin Sessions in Page Designer:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the page name.
    The Property Editor displays the Page attributes.
  3. Click the Collapse All icon and then locate and expand Security.
  4. Under Security: Rejoin Sessions, select an option:
    • Application Default - Inherits the setting defined at application-level.

    • Disabled - If the URL does not contain a session ID Application Express creates a new session.

    • Enabled for Public Sessions - If the URL goes to a public page and does not contain a session ID, Application Express attempts to utilize the existing session cookie established for that application. Application Express only joins using the cookie when the session is not yet authenticated.

      The option Enabled for Public Sessions requires that Embed In Frames be set to Allow from same origin or Deny. This is not tied to a condition about the URL payload, but also applies to session state protected URLs.

    • Enabled for All Sessions - If the URL does not contain a session ID, Application Express attempts to utilize the existing session cookie established for that application, providing the following conditions are met:

      • Session State Protection is enabled for the application and the URL includes a valid checksum. For public bookmarks, the most restrictive item level protection must be either Unrestricted or Checksum Required - Application Level.

      • The URL does not contain payload (a request parameter, clear cache or data value pairs).

        This setting also requires that Embed In Frames is set to Allow from same origin or to Deny for the application.

    Tip:

    The option Application Default inherits the setting defined at application-level. See "Browser Security."

  5. Click Save.

See Also:

7.4.4 Configuring Dialog Attributes in Page Designer

Tip:

Creating a dialog page is a multiple step process. To learn more, see "Creating Dialog Pages."

To configure Dialog attributes in Page Designer:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the page name.
    The Property Editor displays the Page attributes.
  3. Click the Collapse All icon.
  4. Locate and expand Appearance and verify that the Page Mode is set to either Modal Dialog or Non-Modal Dialog.
  5. Expand Dialog and configure these attributes:

    Tip:

    To view help for an attribute, select the attribute in the Property Editor and click the Help tab in the central pane.

    1. Width
    2. Height
    3. Maximum Width
    4. Attributes
    5. CSS Classes
    6. Chained
  6. To save your changes, click Save or Save and Run Page.

7.4.5 Configuring Page Attributes to Warn Users of Unsaved Changes

Developers can enable the Warn on Unsaved Changes page attribute to warn users of unsaved changes on a page when they attempt to navigate away from it.

To enable the Warn on Unsaved Changes page attribute:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. In the Rendering tab, select the page name.
    The Property Editor displays the Page attributes.
  3. Click the Collapse All icon and then locate and expand Navigation..

    Tip:

    To search for an attribute, enter a keyword in the Filter Properties field. The attribute appears.

  4. For Warn on Unsaved Changes, select Yes to warn users
  5. Click Save.

Tip:

The Warn on Unsaved Changes attribute is implemented using the apex.page.warnOnUnsavedChanges API.