Previous Next JavaScript must be enabled to correctly display this content

## 7.4 Managing Page Attributes

Edit page attributes to 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.

- Editing Page Attributes
  Edit page attributes by viewing the page in Page Designer and selecting the page name.
- Incorporating JavaScript Using Page Designer
  Include JavaScript on a page by editing the page attributes in the JavaScript group.
- Configuring Rejoin Sessions for a Page
  Configure the Rejoin Sessions attribute to determine whether URLs to this application page contain session IDs.
- Configuring Dialog Attributes
  Configure Dialog attributes in Page Designer.
- Configuring Pages to Warn Users of Unsaved Changes
  Enable the Warn on Unsaved Changes page attribute to warn users if they navigate away from a page containing unsaved changes.

See Also:

Right Pane of Page Designer (Property Editor)

Parent topic: Editing Pages in Page Designer

### 7.4.1 Editing Page Attributes

Edit page attributes by viewing the page in Page Designer and selecting the page name.

To edit page attributes:

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.
3. Edit the appropriate attributes in the Property Editor.

   Tip:

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

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

See Also:

Right Pane of Page Designer (Property Editor) and Viewing Field-Level and Page Designer Help

Parent topic: Managing Page Attributes

### 7.4.2 Incorporating JavaScript Using Page Designer

Include JavaScript on a page by editing the page attributes in the JavaScript group.

Including JavaScript on a page 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.

To add JavaScript code to a page:

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. In the Property Editor, find the JavaScript group.
4. Under JavaScript, edit following attributes:
   1. 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.
   2. 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:

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

      To reference a shortcut, use:

      `"SHORTCUTNAME"`

   3. Execute When Page Loads - Enter JavaScript code to execute when the page loads. The code is executed after the JavaScript code generated by Oracle APEX.

   Tip:

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

   For example, adding the following to the Function and Global Variable Declaration attribute would create a function called `test`, which you could then use from anywhere on the current page.

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

5. Click Save.

Parent topic: Managing Page Attributes

### 7.4.3 Configuring Rejoin Sessions for a Page

Configure the Rejoin Sessions attribute to determine whether URLs to this application page contain session IDs.

The Rejoin Sessions attribute controls support for joining existing sessions (similar to deep linking).

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 at the page level, administrators must enable Rejoin Sessions at the instance level. A more restrictive instance-level setting overrides application and page settings.

To configure Rejoin Sessions for a page:

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. In the Property Editor, find the Security group.
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 Oracle APEX creates a new session.

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

     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, APEX 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:

- About Rejoin Sessions
- Session Management to configure Rejoin Sessions at the application-level
- Configuring Rejoin Sessions for an Instance in Oracle APEX Administration Guide

Parent topic: Managing Page Attributes

### 7.4.4 Configuring Dialog Attributes

Configure 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:

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. In the Property Editor, find Appearance and verify that the Page Mode is set to either Modal Dialog or Non-Modal Dialog.
4. Find Dialog and configure these attributes:
   1. Width
   2. Height
   3. Maximum Width
   4. Attributes
   5. CSS Classes
   6. Chained

   Tip:

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

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

See Also:

Creating Dialog Pages and Right Pane of Page Designer (Property Editor)

Parent topic: Managing Page Attributes

### 7.4.5 Configuring Pages to Warn Users of Unsaved Changes

Enable the Warn on Unsaved Changes page attribute to warn users if they navigate away from a page containing unsaved changes.

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. In the Property Editor, find the Navigation group.
4. For Warn on Unsaved Changes, select On to warn users if they navigate away from a page that contains unsaved changes.
5. Click Save.

Tip:

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

See Also:

- Configuring Button Attributes to Warn Users of Unsaved Changes

- Configuring Item Attributes to Warn Users of Unsaved Changes

- warnOnUnsavedChanges in Oracle APEX JavaScript API Reference

Parent topic: Managing Page Attributes