24.1.5 Accessing Page Attributes in Legacy Component View

Common page attributes you may want to edit include the page name or title, header and footer text, and the selected authorization scheme.

Topics:

24.1.5.1 Editing Page Attributes in Component View

To edit page attributes:

  1. View the page in Component View.
  2. Under Page, click the page name or theEdit All icon.

    The Page Attributes page appears.

  3. Edit the appropriate attributes.

    Required values are marked with a red asterisk (*).

    Tip:

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

    The Page Attribute page is divided into sections.

    You can access these sections by scrolling down the page, or by clicking navigation buttons at the top of the page. When you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

  4. To save your changes, click Apply Changes.

24.1.5.2 Page Attributes in Component View

Component View Page Attributes page are divided into the following sections:

Topics:

24.1.5.2.1 Name

Table 24-4 describes general attributes for the current page such as the page name, an optional alphanumeric alias, and associated page groups.

Table 24-4 Page Attributes: Name

Attributes Description

Name

Identifies the name of the current page for application developers. This name is used in numerous pages and reports, along with the page number and page title.

Page Alias

Enter an alphanumeric alias for this page. This alias must be unique within the current application.

For example, if you were working on page 1 of application 100, you could create an alias called home. You could then access this page from other pages using the following f?p syntax:

f?p=100:home

Group

Identify the page group you would like to associate with this page. Page groups do not affect functionality, but help developers manage the pages within an application.

To remove a page from a group, select No Group Assigned and click Apply Changes.

See Also: "Creating Page Groups"

24.1.5.2.2 Display Attributes

Table 24-5 describes general display attributes for the current page such as the selected page template, standard tab set, title, and cursor focus.

Table 24-5 Page Attributes: Display Attributes

Attributes Descriptions

Title

Enter a title to display in the title bar of the browser window. The Application Express engine uses the title you specify here in place of the #TITLE# substitution string used in the page template. This title is inserted between the HTML tags <TITLE> and </TITLE>.

Page Mode

Select a page mode. Options include:

  • Normal - The page displays as a normal Application Express application page.

  • Modal Dialog - A modal dialog is an overlay window positioned within the within the same browser window. A modal dialog remains active and focused until the user has finished with it and closes it. While a modal dialog is active, the user is unable to interact with the rest of the page until the dialog is closed.

  • Non-modal Dialog - A non-modal dialog displays a separate popup browser window. A user can interact with a non-modal dialog and content on the page. Use a non-modal dialog when the requested information is not essential to continue. This type of window can be left open while work continues elsewhere.

See Also: "Creating Dialog Pages"

Page Template Options

Template options enable you to select a number of CSS customization settings to be applied to the current page template. Template options and their corresponding CSS classes are defined at the page template-level. To learn more about an attribute, see field-level Help.

See Also: "Editing Themes"

Page CSS Classes

Enter additional CSS classes as space a delimited list which are substituted if the page template contains the substitution string #PAGE_CSS_CLASSES#.

See Also: "Editing Themes"

Cursor Focus

Specify the cursor focus. Available options include:

  • Select First item on page to have the cursor focus placed in the first field on the page.

  • Select Do not focus cursor if you do not want to include JavaScript. Select this option to prevent conflicts between generated JavaScript and custom JavaScript.

Media Type

Enter the Internet Media Type. An Internet Media Type is two-part identifier for file formats on the Internet. A Media Type is composed of at least two parts: a type, a subtype, and one or more optional parameters. This Media Type is used in the Content-Type HTTP header when rendering the page. The page-level Media type overrides the application-level media type. The default value for this attribute is NULL If both the page-level and application-level values for Media Type are NULL, the Media Type text/html is used.

24.1.5.2.3 JavaScript

Table 24-6 describes attributes that enable you to include JavaScript on the current page.

Table 24-6 JavaScript Attributes

Attribute Description

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.

To view examples, see field-level Help.

Function and Global Variable Declaration

Enter JavaScript code (for example, functions or global variable declarations) for code to be used on this page. If the code is used on multiple pages, consider putting it into an external JavaScript file to avoid duplication.

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

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.

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

Note: Do not to add any opening or closing script tags, just the JavaScript code.

24.1.5.2.4 CSS

Table 24-7 describes attributes that enable you to include Cascading Style Sheet (CSS) files on the current page.

Table 24-7 CSS Attributes

Attribute Description

File URLs

Enter Cascading Style Sheet file URLs 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.

File URLs you enter here replace the #PAGE_CSS# substitution string in the page template.

Note: You do not need to include opening or closing link tags. Just include the file URL

To view examples, see field-level Help.

Inline

Enter Cascading Style Sheet code to be used on this page. If the code is used on multiple pages, consider putting it into an external file to avoid duplication and to leverage browser caching of static files.

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

Note: Do not include opening or closing style tags. Just include the cascading style sheet code.

To view examples, see field-level Help.

24.1.5.2.5 Dialog

Table 24-8 describes attributes for defining a page which displays as a dialog. These attributes only apply when the Page Mode is set to Modal Dialog or Non-Modal Dialog.

Tip:

These attributes overwrite similar settings defined at the page template-level. See "Dialog".

Table 24-8 Page Attributes: Dialog

Attribute Description

Width

Enter the width of the dialog, in pixels or a percentage. This setting overwrites the default dialog width specified at page template-level.

For a page using a Desktop user interface, the value should be set in pixels, for example, 500. For a page using the jQuery Mobile Smartphone user interface, the value should be set in percent, for example, 80%.

The substitution string #DIALOG_WIDTH# in the dialog initialization code of the page template is replaced with the value entered in this item.

Height

Enter the height of the dialog in pixels, for example, 500.

The substitution string #DIALOG_HEIGHT# in the dialog initialization code of the page template is replaced with value entered in this item.

Maximum Width

Enter the maximum width of the dialog, in pixels. This setting will overwrite the default dialog maximum width specified at page template-level.

For a page using the jQuery Mobile Smartphone user interface, the maximum width is 500.The substitution string #DIALOG_MAX_WIDTH# in the dialog initialization code of the page template is replaced with the value entered in this item.

Attributes

Dialog support in Oracle Application Express varies depending on the page user interface: Desktop user interfaces use a jQuery UI dialog and Mobile user interface uses the jQuery Mobile dialog widget. Oracle Application Express supports the following subset of dialog attributes: height, width, and maximum width.

The substitution string #DIALOG_ATTRIBUTES# in the dialog initialization code defined at page template level, will be replaced by any value(s) entered in this item.

To learn more, see field-level Help.

CSS Classes

Enter additional CSS classes you wish to be applied to the dialog, as a space delimited list. For example:

ui-dialog--wizard

Any occurrence of the substitution string #DIALOG_CSS_CLASSES# in the page template is replaced with the values specified in this field. This value overwrites any value set at page template-level.

Chained Dialog

Select Yes if this dialog is opened by another dialog, and should reuse the same dialog window. For example, if this dialog is part of a multiple page dialog wizard, and you wish to reuse the dialog window for each step of the wizard.

Select No if this dialog is opened by another dialog, and should be opened in a new dialog window. For example, when this dialog is modal, and you wish to open it within a parent modal dialog window.

24.1.5.2.6 HTML Header

Table 24-9 describes attributes for defining the page header and page HTML body text.

Table 24-9 HTML Header Attributes

Attribute Description

HTML Header

Enter text to replace the #HEAD# substitution string in the page template header. The values entered here are inserted after the HTML <HEAD> tag. Use this page attribute to add page specific meta tags.

Note: JavaScript code or Cascading Style Sheets should be added to the dedicated JavaScript and CSS attributes.

Page HTML Body Attribute

Enter text to be substituted in for your page template's #ONLOAD# substitution string. To use this feature, your page template must include the #ONLOAD# substitution string.

24.1.5.2.7 Header and Footer

Table 24-10 describes attributes for defining the header and footer text.

Table 24-10 Header Text and Footer Text

Attribute Description

Header Text

Enter any text or HTML to appear immediately following the page header and before the body content.

Footer Text

Enter text or HTML to appear before the page template footer.

24.1.5.2.8 Read Only

Select a condition type from the list that must be met in order for this page to render page items as a read-only. Not selecting a condition causes the page items to render normally. The read only condition is evaluated after executing the processes with a processing point of Before Header.

Tip:

If you want some page items (for example a search field) or all page items of a specific region to always render as enterable page items independent of how this condition evaluates, then set the Read Only condition of those regions or page items to Never.

24.1.5.2.9 Security

Table 24-11 describes attributes for defining authorization scheme and authentication requirements for the current page.

Table 24-11 Page Attributes: Security

Attribute Description

Authorization Scheme

Select an authorization scheme to be applied to the page. Authorization schemes are defined at the application-level and can be applied to many elements within the application.

An authorization scheme is evaluated either once for each application session (at session creation), or once for each page view. If the selected authorization scheme evaluates to true, then the page displays and is subject to other defined conditions. If it evaluates to false, then the page does display and an error message displays.

See Also: "Providing Security Through Authorization"

Authentication

Specifies whether this page has been defined as public or requires authentication. If a page is identified as public, the page can be viewed before authentication. This attribute only applies to applications requiring authentication. The application's page sentry function can access this page attribute to identify pages that do not require prior authentication to view. The implementation of the authentication scheme's page sentry function determines if this attribute has any effect.

See Also: "Establishing User Identity Through Authentication"

Deep Linking

Use this attribute to enable or prevent deep linking to an application page. Options include:

  • Enabled - The URL to a specific page ultimately redirects there, possibly after the user has logged in.

  • Disabled - If the URL does not contain a valid session ID, Application Express starts a new session and redirects to the application's home page.

  • Application Default - The application-level setting is used.

See Also: "Authentication"

Page Access Protection

Note: This attribute only displays if Session State Protection has been enabled for the application. See "Understanding Session State Protection."

Select a Page Access Protection level for the current page:

  • Unrestricted - The page may be requested using an URL with or without session state arguments (Request, Clear Cache, Name/Values).

  • Arguments Must Have Checksum - If Request, Clear Cache, or Name/Value arguments appear in the URL, a checksum must also be provided. The checksum type must be compatible with the most stringent Session State Protection attribute of all the items passed as arguments.

  • No Arguments Allowed - A URL may be used to request the page but no Request, Clear Cache, or Name/Value arguments are allowed.

  • No URL Access - The page may not be accessed using a URL, however the page may be the target of a Branch to Page branch type, which does not do a URL redirect.

Form Auto Complete

Setting this attribute to On has no effect on the page. Setting this value to Off generates the following HTML in the FORM tag:

autocomplete="off"

Browser Cache

Note: This feature requires a modern browser that support the HTTP header response variable cache-control.

Options include:

  • Application Default - The value at runtime is taken from the application's Browser Cache attribute.

  • Enabled - The browser saves the content of application's pages in its cache, both in memory and on disk. If a user presses the browser's back button, the page typically loads from the cache, not from the server.

  • Disabled - The browser does not save page content and requests content from the server. Oracle Application Express sends the HTTP header cache-control: no-store which instructs the browser to not cache the page content in memory and on disk. Disabling Browser Cache also prevents subtle back button issues with pages that use partial page refreshes (for example, pages with interactive reports).

From a security perspective and as a best practice, Oracle recommends the browser cache should be disabled. This prevents the browser from storing sensitive data and ensures the browser always request pages if the URL changes. Otherwise, it may even be possible to go back in the browser history after a logout and see cached content of the former session.

Rejoin Sessions

The Rejoin Sessions attribute controls if Application Express should support application URLs that do not contain session IDs. When rejoin sessions is enabled, Application Express attempts to use the session cookie to join an existing session, when a URL does not contain a session ID. A more restrictive instance-level setting overrides this page level value.

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

From Rejoin Sessions, select an option:

  • Application Default - Inherits the setting defined at application-level. See "Browser Security."

  • 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. For applications with both public and authenticated pages, a session ID is defined after the end user authenticates. Application Express only joins using the cookie when the session is not yet authenticated.

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

See Also: "Browser Security," "About Rejoin Sessions," and "Configuring Rejoin Sessions" in Oracle Application Express Administration Guide

24.1.5.2.10 Duplicate Submission

Use the Allow duplicate page submissions list to specify whether users may process a page multiple times in a row. Set this attribute to No to prevent duplicate page submissions from being processed multiple times.

Examples of duplicate page submissions include:

  • A user clicks the Submit button multiple times.

  • You create a branch of type Branch to Page, and the user clicks the browser reload button.

In On duplicate page submissions go to this URL, enter a URL. Use this field if you set Allow duplicate page submissions to No. If you select No and a user attempts to submit the same page twice, Oracle Application Express displays an error message and a link to the URL you specify.]

24.1.5.2.11 Server Cache

Table 24-12 describes attributes to enable caching for the current page.

Table 24-12 Page Attributes: Server Cache

Attribute Description

Cache Page

Specify whether or not to enable page caching. Page caching can improve performance because the page displays from cache instead of displaying dynamically. Options include:

  • Disabled - Content is not cached and computed for each request.

  • Enabled - Content is cached and utilized by all users.

  • Cached by User - Content is cached specifically for each user.

  • Cache by Session - Content is cached specifically for each session.

Cache Timeout

Displays if you select you select Enabled or Cached by User. Specify the amount of time for which a cached page remains valid.

Cache Page Condition

Specify a condition. If the condition returns true, the page is displayed from cache. If the condition returns false, the page is rendered dynamically and is not retrieved from cache.

Expression 1

Displays conditionally based on the selected Cache Page Condition. Enter values in this attribute based on the specific condition type selected.

Expression 2

Displays conditionally based on the selected Cache Page Condition. Enter values in this attribute based on the specific condition type selected.

24.1.5.2.12 Configuration

Select a build option for this page. You can use build options to enable or disable functionality. Most application attributes have a build option attribute. Do not specify a build option for the current page unless you plan to exclude the page in certain configurations.

Build options have two possible values: INCLUDE and EXCLUDE. If you specify an attribute as being included, then the Application Express engine considers it part of the application definition at runtime. Conversely, if you specify an attribute as being excluded, then the Application Express engine treats it as if it did not exist.

24.1.5.2.13 Error Handling

Table 24-13 describes attributes used to control or modify how an application logs errors.

In-line Error Notification Text, enter the error text that displays in the #NOTIFICATION_MESSAGE# template substitution string in the event an error occurs on the page.

Table 24-13 Page Attributes: Error Handling

Attribute Description

In-line Error Notification Text

Enter the error text that displays in the #NOTIFICATION_MESSAGE# template substitution string in the event an error occurs on the page.

Error Handling Function

Enter the name of a PL/SQL error function to modify the existing error message and display location or log the error if one occurs. This function can reference a package function or standalone function in the database. For example:

log_apex_error

When referencing a database PL/SQL package or standalone function, use the #OWNER# substitution string to reference the parsing schema of the current application. For example:

#OWNER#.log_apex_error

You must implement error handling functions using the syntax described in the apex_error package.

function <name of function> (
    p_error in apex_error.t_error )
    return apex_error.t_error_result

See Also: apex_error in Oracle Application Express API Reference

Note: Error handling specified at the page-level overwrites any error handling function specified at the application-level. See "Editing Application Attributes."

See Also:

"Page Templates"

24.1.5.2.14 Help

Use this attribute to enter Help text for the current page. Help text is displayed using a help system that you must develop.

24.1.5.2.15 Comments

Use this attribute to record comments about the current page. These comments never display when the application is running.

24.1.5.3 Incorporating JavaScript Using Component View

You can include JavaScript into your application by adding it to the JavaScript attribute of the page. 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 the .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 Component View.
  2. Under Page, click the Edit All icon.
  3. Under JavaScript, enter code into the following attributes:

    Tip:

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

    • 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 (for example, functions or global variable declarations) for code to be used on this page. If the code is used on multiple pages, consider putting it into an external JavaScript file to avoid duplication.

    • 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 would test a function accessible from anywhere on the current page.

      function test(){
        alert('This is a test.');
      }
    
  4. Click Apply Changes.

24.1.5.4 Configuring Rejoin Sessions in Component View

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 Component View:

  1. View the page in Component View.
  2. Under Page, click the Edit All icon.
  3. Scroll down to Security.
  4. From Rejoin Sessions, select an option:
    • Disabled - All URLs must contain session IDs.

    • Enabled for Public Sessions - URLs to public pages do not have to contain session IDs if the user has not logged in yet.

    • Enabled for All Sessions - URLs do not have to contain session IDs if they are checksum protected or if they do not contain payload (a request parameter, clear cache or item data). This setting also requires that the application's Embed In Frames attribute is set to Allow from same origin or to Deny.

  5. Click Apply Changes.

24.1.5.5 Configuring Dialog Attributes in Component View

Tip:

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

To configure Dialog attributes in Component View:

  1. View the page in Component View.
  2. Under Page, click the Edit All icon.
  3. Under Display Attributes, verify the Page Mode is set to either Modal or Non-Modal. See field-level Help for more information.
  4. Scroll down to Dialog.
  5. Under Dialog. and configure the attributes.

    Table 24-14 Page Attributes: Dialog

    Attribute Description

    Width

    Enter the width of the dialog, in pixels or a percentage. This setting overwrites the default dialog width specified at page template-level.

    For a page using a Desktop user interface, the value should be set in pixels, for example, 500. For a page using the jQuery Mobile Smartphone user interface, the value should be set in percent, for example, 80%.

    The substitution string #DIALOG_WIDTH# in the dialog initialization code of the page template is replaced with the value entered in this item.

    Height

    Enter the height of the dialog in pixels, for example, 500.

    The substitution string #DIALOG_HEIGHT# in the dialog initialization code of the page template is replaced with value entered in this item.

    Maximum Width

    Enter the maximum width of the dialog, in pixels. This setting will overwrite the default dialog maximum width specified at page template-level.

    For a page using the jQuery Mobile Smartphone user interface, the maximum width is 500.The substitution string #DIALOG_MAX_WIDTH# in the dialog initialization code of the page template is replaced with the value entered in this item.

    Attributes

    Dialog support in Oracle Application Express varies depending on the page user interface: Desktop user interfaces use a jQuery UI dialog and Mobile user interface uses the jQuery Mobile dialog widget. Oracle Application Express supports the following subset of dialog attributes: height, width, and maximum width.

    The substitution string #DIALOG_ATTRIBUTES# in the dialog initialization code defined at page template-level, replaces any values entered in this item.

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

    CSS Classes

    Enter additional CSS classes you wish to be applied to the dialog, as a space delimited list. For example:

    ui-dialog--wizard
    

    Any occurrence of the substitution string #DIALOG_CSS_CLASSES# in the page template is replaced with the values specified in this field. This value overwrites any value set at page template-level.

    Chained Dialog

    Select Yes if this dialog is opened by another dialog, and should reuse the same dialog window. For example, if this dialog is part of a multiple page dialog wizard, and you wish to reuse the dialog window for each step of the wizard.

    Select No if this dialog is opened by another dialog, and should be opened in a new dialog window. For example, when this dialog is modal, and you wish to open it within a parent modal dialog window.

  6. Click Apply Changes.