Skip Headers
Oracle® Application Express Application Builder User's Guide
Release 3.2

Part Number E11947-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

5 Working with Application Pages

This section provides important background information about creating and managing pages within and application.

This section contains the following topics:

See Also:

"Quick Start", "Application Builder Concepts", "Building an Application", "Controlling Page Layout", and "Adding Navigation"

About the Page Definition

A Page Definition is the basic building block of a page. Each page can have buttons and fields (called items), which are grouped into containers called regions. Pages can also have application logic (or processes). You can branch from one page to the next using conditional navigation; perform calculations (called computations); perform validations (such as edit checks); and display reports, calendars, and charts. You view, create, and edit the controls that define a page by accessing the Page Definition.

Topics in this section include:

Accessing a Page Definition

You can view, create, and edit the controls that define a page through the Page Definition.

To access the Page Definition for an existing page:

  1. On the Workspace home page, click the Application Builder icon.

    The Application Builder home page appears.

  2. Select an application.

    The Application home page appears.

  3. Select a page.

    The Page Definition appears.

Understanding the Page Definition

A Page Definition is the basic building block of a page. You use the Page Definition to view, create, and edit the controls and application logic that define a page. The sections that follow describe the different parts of the Page Definition.

Topics in this section include:

Available Navigation Bar Controls and Buttons

A navigation bar appears directly beneath the breadcrumb trail.

Description of pg_def_top.gif follows
Description of the illustration pg_def_top.gif

Available controls on the page navigation bar include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

The following buttons appear to the right of the navigation bar:

About the Action Bar

The Run Page, Shared Components, Comment, Lock, Export Page, and Find icons display on the Action bar.

Description of pg_def_icons.gif follows
Description of the illustration pg_def_icons.gif

Run Page Icon

The Run Page icon resembles a small, light green traffic light. Click this icon to render the current page into viewable HTML. When you run a page, the Application Express engine dynamically renders the page based on data stored in the database. See "Running a Page or Application".

Shared Components Icon

The Shared Components icon resembles a small mechanical gear. Click this icon to view a list of shared components and user interface controls that can display or be applied on every page within an application. See "Working with Shared Components".

Developer Comment Icon

The Developer Comment icon resembles a green balloon. Use this icon to add comments to an application, a page, or a group of pages. See "Adding Developer Comments".

Lock Icon

The Lock icon indicates whether a page is available for editing. If a page is unlocked, the icon appears as an open padlock. If the page is locked, the icon appears as a locked padlock. Click this icon to change the lock status. See "Locking and Unlocking a Page".

Export Page Icon

The Export Page icon resembles a downward arrow. Click this icon to export the current page. See "Exporting a Page in an Application".

Find Icon

The Find icon resembles a flashlight. Click this icon to search for items, pages, queries, tables, PL/SQL, images, and cascading style sheets (CSS) within the current application or the schemas associated with the workspace. See "Using the Find Icon".

About Page Rendering, Page Processing, and Shared Components

Every Page Definition is divided into three sections:

  • Page Rendering. Page rendering is the process of generating a page from the database. The Page Rendering section lists user interface controls and logic that execute when a page is rendered. See "About Page Rendering".

  • Page Processing. Page processing occurs once a page is submitted. Typically a page is submitted when a user clicks a button. The Page Processing section lists logic controls (such as computations and processes) that are evaluated and executed when the page is processed. See "About Page Processing".

  • Shared Components. The Shared Components section lists common components that can be used by one or more pages within an application. See "About Shared Components".

Using the View List on the Page Definition

You can use the View list to quickly switch from a Page Definition to the Page Events, Database Object Dependencies, History, Export, Groups, and Referenced Components pages.

Description of pg_def_view_list.gif follows
Description of the illustration pg_def_view_list.gif

Topics in this section include:

Accessing the View List on the Page Definition

To access other pages using the View list:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. Select a page.

    The Page Definition appears.

  5. From the View list, select one of the following:

About Page Events

Page Events details all currently defined page controls and processes. This page provides a chronological view of how and in what order the Application Express engine renders the page, invokes logic, and runs processes.

A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

  • Show All displays all possible page controls and processes, including those not currently defined.

  • Show Used displays currently used page controls and processes (Default).

  • Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page.

To view details about a specific page control or process, click the appropriate hypertext link. Alternately, you can create page controls and processes by clicking the small icons to the left of each entry.

About Database Object Dependencies

The Database Object Dependencies page displays a list of database objects referenced by the current page.

A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

  • Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page.

About History

The History page displays a history of recent changes to the currently selected page by developer (or user), application, page number, modification date, component, and action.

A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

  • Display. Determines how many pages display. To change the number of pages that appear, make a selection from the Display list and click Go.

  • Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page.

About Export

Use the Export page to export the current page and its referenced components. A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

About Groups

The Groups page displays all pages that are part of the same page group as the current page. Click a page number to edit the page group. Click a page name to view the page definition.

A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • Display. Determines how many pages display. To change the number of pages that appear, make a selection from the Display list and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

About Referenced

The Referenced Components page lists page components and shared components associated with the current page.

A navigation bar appears directly beneath the breadcrumb trail. Available controls include:

  • Page. Displays the current page number. To view another page, enter the page number in the Page field and click Go.

  • View. Controls the current page view. To view alternative reports, make a selection from the list and click Go. See "Using the View List on the Page Definition".

  • Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page.

Editing a Page Definition

A page is the basic building block of an application. Each page has a page number, a name, and typically some text attributes such as a header, title, and footer. You add content to your page by creating page controls (regions, items, and buttons). Page templates and page region templates control the exact look and feel of each page.

Topics in this section include:

About the Edit All Icon

Each Page Definition is divided into three sections: Page Rendering, Page Processing, and Shared Components. Each of these sections is broken into subsections with headings that identify the type of control, component, or application logic.

You can edit all controls, components, or logic within a given subsection by clicking the Edit All icon that displays to the right of the subsection title. The Edit All icon resembles a small grid with a pencil on top of it.

Description of pg_def_editall_ico.gif follows
Description of the illustration pg_def_editall_ico.gif

Clicking the Edit All icon displays pages that enable you to edit or delete multiple controls, components, or application logic simultaneously or view a history of recent changes.

For example, selecting the Edit All icon under Regions displays a summary report of all currently defined regions on the current page. You can use this summary view to:

  • Edit the multiple attributes at once by making selections from the available fields and select lists.

  • Link to a definition page by clicking the Edit icon.

You can access similar summary views on the next or previous page by clicking the Next and Previous buttons at top of each page. To save your edits to any summary view, click Apply Changes.

You can also view the attributes of a specific control or component by selecting its name on the Page Definition. For example, suppose your Page Definition contains a region named Customers. Clicking the region name Customers would display an attributes page for that region.

About the Copy or Create Icons

You can copy or create controls or components by clicking the Copy and Create icons. The Copy icon resembles two small overlapping pages. Click the Copy icon to make a copy of an existing control or component.

Description of pg_def_copy_ico.gif follows
Description of the illustration pg_def_copy_ico.gif

The Create icon resembles a plus (+) sign overlapping a small page. Click the Create icon to create a control or component.

Description of pg_def_create_ico.gif follows
Description of the illustration pg_def_create_ico.gif

Reordering Page Components

You can quickly change the order in which regions, button, and items display using the Reorder icon on the Page Definition. The Reorder icon displays as a light green downward arrow and upward arrow.

Description of reorder_regions.gif follows
Description of the illustration reorder_regions.gif

To reorder page components, click the Reorder icon. When the Reorder page appears click the up and down arrows and then click Apply Changes.

About Page Rendering

Page rendering is the process of generating a page from the database. Use the Page Rendering section to modify controls that impact the rendering of a page, including page attributes, regions, buttons, items, page rendering computations, and page processes.

Description of page_rendering.gif follows
Description of the illustration page_rendering.gif

You can quickly navigate to a specific subsection by clicking the icons beneath the heading. When you select one of these icons, the subsection appears and all other subsections are temporarily hidden. To restore the view, click Show All. The Show All icon resembles an inverted triangle.

Topics in this section include:

Page

Page attributes control specific characteristics of a page such as the page name, display attributes such as the page title and the associated page template, header text, and the selected authorization scheme to name just a few. You access page attributes from the Page Definition.

Regions

A region is a area on a page that serves as a container for content. Each page can have any number of regions. The content of a region is determined by the region source. For example, a region may contain a report based on a SQL query you define, or it may contain static HTML.

You control the appearance of a region through a specific region template. You can use regions to group page controls (such as items or buttons). You can also create simple regions that do not generate additional HTML, or create elaborate regions that frame content within HTML tables or images.

See Also:

Buttons

As you design your application, you can use buttons to direct users to a specific page or URL, or to enable users to submit a page. When you submit a page, the Application Express engine posts or processes information. A button can be implemented as an HTML button, an image, or by using a template. Buttons can be placed in predefined region template positions or among items in a form.

Items

Items are HTML form elements such as text fields, select lists, and check boxes with an associated session state. Item attributes affect the display and behavior of items on a page. For example, these attributes can impact where a label displays, how large an item will be, and whether the item will display next to, or below the previous item.

There are two categories of items: page items and application items. Page-level items are placed on a page and have associated user interface properties, such as Display As, Label, and Label Template. Application-level items are not associated with a page and therefore have no user interface properties. An application item can be used as a global variable.

Computations

Computations are units of logic used to assign session state to items. You can use computations to assign a value to an identified item when a page is submitted or displayed.

Application-level computations assign a value to an item each time a page is rendered. A page-level computation assigns a value to an identified item when a page is displayed or submitted (rendered and processed).

Processes

Processes are logic controls used to execute data manipulation language (DML) or PL/SQL. For example, you can use a process to populate session state at the time a page is rendered, to execute some type of logic (for example, using PL/SQL), or to make a call to the rendering engine. Typically a process performs an action. A process may be hand coded PL/SQL, or the invocation of a predefined process.

About Page Processing

Page processing is the process of submitting a page. A page is typically submitted when a user clicks a button. Use the Page Processing section of the Page Definition to specify application logic such as computations, validations, processes, and branches. In general, the Application Express engine runs this logic in the order it appears on the Page Definition.

Description of page_processing.gif follows
Description of the illustration page_processing.gif

You can quickly navigate to a specific subsection by clicking the icons beneath the heading. When you select one of these icons, the subsection appears and all other subsections are temporarily hidden. To restore the view, click Show All. The Show All icon resembles an inverted triangle.

Topics in this section include:

Computations

Computations are units of logic used to assign session state to items and are executed at the time the page is processed.

Validations

Validations enable you to create logic controls to verify whether user input is valid. For example, a validation can check whether a value has been entered into a mandatory field.

Processes

Processes are logic controls used to execute data manipulation language (DML) or PL/SQL. Processes are executed after the page is submitted.

Branches

Branches enable you to create logic controls that determine how the user navigates through the application.

About Shared Components

The Shared Components section of the Page Definition contains common elements that can display or be applied on any page within an application.

Description of shared_components.gif follows
Description of the illustration shared_components.gif

You can quickly navigate to a specific subsection by clicking the icons beneath the heading. When you select one of these icons, the subsection appears and all other subsections are temporarily hidden. To restore the view, click Show All. The Show All icon resembles an inverted triangle.

Topics in this section include:

Tabs

Tabs are an effective way to navigate between pages of an application. Application Builder includes two types of tabs: standard tabs and parent tabs.

An application having only one level of tabs uses a standard tab set. A standard tab set is associated with a specific page. You can use standard tabs to link users to other pages within your application. A parent tab set functions as a container to hold a group of standard tabs. Parent tabs give users another level of navigation and context (or sense of place) within the application.

See Also:

"Creating Tabs"

Lists of Values

A list of values (LOV) is a static or dynamic definition used to display a specific type of page item, such as a radio group, check box, or select list. LOVs can be static (that is, based on a set of predefined display and return values) or dynamic (based on SQL queries that select values from tables). Once created, an LOV can then be referenced by one or more page items.

You define LOVs at the application level by running the LOV Wizard and adding them to the List of Values repository.

Breadcrumbs

A breadcrumb is a hierarchical list of links that is rendered using a template. For example, you can display breadcrumbs as a list of links or as a breadcrumb path.

Lists

A list is a collection of links that is rendered using a template. For each list entry, you specify display text, a target URL, and other attributes that control when and how the list entry displays. You control the display of the list and the appearance of all list entries by linking the list to a template.

See Also:

"Creating Lists"

Theme

A theme is a named collection of templates that defines the application user interface. Each theme contains templates for every type of application component and page control, including individual pages, regions, reports, lists, labels, menus, buttons, and list of values.

Templates

Templates control the look and feel of the pages in your application. As you create your application, you specify templates for pages, regions, reports, lists, labels, menus, buttons, and popup lists of values. Groups of templates are organized into named collections called themes.

Security

You can provide security for your application by specifying an authorization scheme. Authorization is a broad term for controlling access to resources based on user privileges.

Navigation Bar

Use a navigation bar to link users to various pages within an application. Typically a navigation bar is used to enable users to log in, log out, or link to Help text. The location of a navigation bar depends upon the associated page template. A navigation bar icon enables you to display a link from an image or text. When you create a navigation bar icon you can specify an image name, text, display sequence, and target location (a URL or page).

Understanding Page Computations

Use page computations to assign a value to an identified item when a page is submitted or displayed. You can also use application-level computations to assign values to items. Most application-level computations are performed for every page in an application. In contrast, computations created at the page-level only execute when that page is rendered or processed.

Topics in this section include:

Creating a Page Computation

A page computation assigns a value to an identified item when a page is displayed or submitted (rendered and processed).You create a page computation by running the Create Page Computation Wizard. For each computation, specify the item for which you are creating the computation and a computation type.

See Also:

"Computations"

To create a page computation:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Computations, click the Create icon.

  3. For Item Location, select where the computation will execute and click Next. Location options include:

    • Item on this Page

    • Item on Another Page

    • Application Level Item

  4. For Item, select the item and computation point at which you would like to perform the computation:

    1. Compute Item - Select the item the computation will update.

    2. Sequence - Select the order of evaluation.

    3. Computation Point - Select the point at which the computation executes. The computation point On New Instance executes the computation when a new session (or instance) is generated.

    4. Computation Type - Select the method of computation you want to create.

    5. Click Next.

  5. In Computation, enter a computation that corresponds to the selected computation type and click Next.

  6. On Condition, you can choose to make the computation conditional. To make a computation conditional, make a selection from the Condition Type list and enter text in the expression fields.

  7. Click Create.

Understanding Computation Points and Computation Syntax

A good example of using computations can be illustrated by a page containing form fields for entering phone numbers. In this example, the phone number is stored in one database column; however, the data entry form breaks the phone number into three components: area code, prefix, and line number. In this example, the page items are called P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER.

Next, suppose you need to combine the values stored in these items into a single string. You could accomplish this by using an After Submit computation and store the combined values in an item called P10_PHONE_NUMBER.

To create a computation to store the combined values of P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER in new items:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Create a item named P10_PHONE_NUMBER to store the combined values of P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER. See "Differences Between Page Items and Application Items".

  3. Under Computations, click the Create icon.

  4. For Item Location, select Item on this Page and click Next.

  5. For Computation, select P10_PHONE_NUMBER.

  6. For Sequence, select the order of evaluation.

  7. For Computation, you have the option of creating one of the following computation types:

    1. Static Assignment:

      • For Computation Type, select Static Assignment and click Next.

      • Enter the following computation:

        (&P10_AREA_CODE.) &P10_PREFIX.-&P10_LINE_NUMBER.
        
      • Click Next.

    2. PL/SQL Function Body:

      • For Computation Type, select PL/SQL Function Body and click Next.

      • Enter the following computation:

        DECLARE
        l_return_value  VARCHAR2(300) DEFAULT NULL;
        BEGIN
            l_return_value :=
        '('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER;
        RETURN l_return_value;
        END;
        
      • Click Next.

    3. SQL Query:

      • For Computation Type, select SQL Query and click Next.

      • Enter the following computation:

        SELECT '('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER FROM DUAL
        
      • Click Next.

    4. PLSQL Expression:

      • For Computation Type, select PLSQL Expression and click Next.

      • Enter the following computation:

        '('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER
        
      • Click Next.

  8. Click Create.

Editing Page Computation Attributes

Once you create a computation, you can edit it on the Edit Page Computation page.

To edit a page computation:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Computations, select the computation name.

    The Edit Page Computation page appears.

  3. Edit the appropriate attributes.

  4. Click Apply Changes.

Editing the Computation Point and Source

You control when a computation executes under the Computation Point attributes by specifying a sequence and a computation point. The computation point On New Instance executes the computation when a new session (or instance) is generated.

Under Source, enter an expression or query to compute an item's value. In the event a computation fails, you can optionally define an error message in the Computation Error Message field.

Creating Conditional Computations

You can make a computation conditional by making a selection from the Condition Type list and entering text in the expression fields.

Understanding Validations

You can define a validation declaratively by selecting a validation method. You enter the actual validation edit check in the Validation Messages field. Be aware that if a validation fails, subsequent page processes or computations will not occur. Also remember that the validation you enter must be consistent with the validation type you selected. For more information about validation types, see online Help.

Topics in this section include:

Creating a Validation

To create a validation:

Note:

Text entered for validations may not exceed 3,950 characters.
  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Validations in Page Processing, click the Create icon.

    The Create Validation Wizard appears.

  3. Select a validation level:

    • Item level validations are specific to a single item.

    • Page level validations do not apply to any single item, but apply to an entire page.

  4. If you selected Item level validation, select the item to be validated and click Next.

  5. Select a validation method as described in Table 5-1.

    Table 5-1 Validation Methods

    Validation Method Descriptions

    SQL

    Compares item values to data in the database.

    For example, you can use a SQL validation to verify whether a last name typed into a field exists in the database. In the following Exists SQL validation, the field is named P1_LAST_NAME and the table is named customers.

    SELECT 1 FROM customers 
    WHERE last_name = :P1_LAST_NAME
    

    PL/SQL

    Useful if you need complex logic to validate entered data.

    For example, suppose you need to create a validation for an address form that requires the user to enter a province if the address is not in the United States. You could create the validation as a Function Returning Boolean, using the following PL/SQL:

    BEGIN
      IF :P1_COUNTRY = 'US' AND :P1_PROVINCE IS NULL THEN
         RETURN FALSE;
      ELSE
        RETURN TRUE;
      END IF;
    END;
    

    You could also create the same validation implemented as a PL/SQL Expression as follows:

    NOT (:P1_COUNTRY='US' AND  :P1_PROVINCE IS NULL);
    

    Item Level Null

    Checks if an item's value in session state is null.

    For example, you could validate that the user enters a value in a field by creating an item validation and then selecting the validation method Item Not Null.

    Item String Comparison

    Compares the value of an item to a specific string.

    There are several string comparison validations that compare the value of an item to a literal string. For example, you select the validation type Item in Expression 1 is contained in Expression 2 to validate a user entry in a field against a list of values you provide.

    In Expression 1, enter the name of the item you want to validate without a colon. For example:

    P1_VALUE
    

    In Expression 2, enter a string of values you want to validate against. For example:

    ABC/DEF/GHI
    

    Regular Expression

    Regular expressions provide a method to describe text patterns. Use a Regular Expression validation to perform data validation.

    For example, you could use the following regular expression validation to verify that a string of entered data always consists of groups of six numbers separated by commas and followed by a comma:

    ^([[:digit:]]{6},)+$
    

    This regular expression would find the following entries valid:

    123456,654321,

    123456,

    123456,123456,654321,

    However, the following would not be valid:

    123456,12345

    12345


  6. For SQL, PL/SQL, and Item String Comparison validations, select the type of validation you want to create and click Next.

  7. Specify the sequence and validation name and click Next.

  8. Depending upon the validation method, enter the validation or message text that displays if the validation fails. Click Next.

  9. Define conditions that apply to this validation and click Create.

Defining How Validation Error Messages Display

You can choose to have validation error messages display inline (that is, on the page where the validation is performed) or on a separate error page.

To define how a validation error message displays:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Validations, select the appropriate validation.

    The attributes page for the validation appears.

  3. Scroll down to Error Message.

  4. In Error Message, enter your error message text.

  5. From Error message display location, select a display location.

    This attribute identifies where a validation error message displays. Validation error messages can display on an error page or inline within the existing page. Inline error messages can display in a notification area (defined as part of the page template) or within the field label.

    To create a hard error that stops all processing (including validations), you must display the error on an error page.

  6. If you select Inline with Field or Inline with Field and in Notification, you must associate an item with the error message. To associate an item with the error message, select the item from the Associated Item list.

  7. Click Apply Changes.

Tip:

If you select Inline with Field or Inline with Field and in Notification, be aware that the Application Express engine does not execute computations or processes during the re-rendering of the page when the validation error messages appear.

Processing Validations Conditionally

You can control when and if a validation is performed under Conditions.

To create a condition for an existing validation:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Validations, select the appropriate validation.

    The attributes page for the validation appears.

  3. Scroll down to Conditions.

  4. To have a validation performed when a user clicks a particular button, make a selection from the When Button Pressed list.

  5. Make a selection from the Condition Type list.

  6. Depending upon the selected Condition Type, enter values in the Expression attributes. The validation will be rendered or processed if the specified condition is met.

  7. Click Apply Changes.

Understanding Page Processes

A page process performs an action at a specified point during the rendering or submission of the page. For example, you can create a page process to execute logic or to make a call to the Application Express engine. A page process is a unit of logic that runs when a specific event occurs, such as loading or submitting a page.

From a functional perspective, there is no difference between page-level and application-level processes. The difference between these two process types is where the process is defined, that is at the page-level or at the application level.

Topics in this section include:

Creating a Page Process

You create a process by running the Create Process Wizard. During the wizard, you define a process name, specify a sequence and the point at which the process will execute, and select a process category. You can change nearly all of these attributes on the Edit Page Process page.

To create a process:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Under Processes, click the Create icon.

  3. Select a category. Table 5-2 describes available page process categories.

    Table 5-2 Process Categories

    Process Category Description

    Data Manipulation

    Data Manipulation process types are frequently used by wizards to support data manipulation language (DML) actions. Application Builder supports the following declarative data manipulation processes:

    • Select Automatic Row Fetch and Automatic Row Processing (DML) to create an automatic data manipulation language (DML) process.

    • Use Multi Row Update and Multi Row Delete with tabular forms.

    • Use Add Rows to Tabular Form with a tabular form.

    Close Popup Window

    Applies to processes running within a popup window. Upon execution, this process type closes the current popup window.

    Form Pagination

    Implements pagination through the detail records associated with a master detail form. Most often used in master detail forms (such as in the Master Detail Wizard), this process checks the master table to determine which set of detail records you are in and determines what the next detail record should be.

    See Also: "Creating a Master Detail Form"

    On Demand

    Creates an application-level process that can only be executed when called from a specific page. When you create this process type at the page-level, you are creating reference to an existing application-level process.

    See Also: "About On Demand Application Processes"

    PL/SQL

    Runs the PL/SQL you provide. Use this process type to execute a block of PL/SQL entered directly into the process or to simply call an existing API.

    Reset Pagination

    In Report regions, resets pagination back to the first result set. The Application Express engine keeps track of where the user is within a given result set. This process category returns the user to the beginning result set. In other words, this category resets the counters associated with the report region to return the first part of the result set the next time the result set displays.

    Session State

    Sets the values of existing session state items to null. Select this process type to clear the cache for applications, sessions, or items and to clear existing user preferences.

    See Also: "Managing Session State Values" and "Managing User Preferences" in Oracle Application Express Administration Guide

    Web Services

    Implements a Web Service as a process on a page. Running the process submits a request to the service provider.

    See Also: "Invoking a Web Service as a Process"


  4. Follow the on-screen instructions.

Editing Process Attributes

Once you create a process, you can control when the process executes and what the process does by editing attributes on the Edit Page Process page.

To edit an existing page process:

  1. Navigate to the appropriate Page Definition. See "Accessing a Page Definition".

  2. Select the process name.

    The Edit Page Process page appears.

Changing Processing Points and Source

You control when a process executes by specifying a sequence number and a process point under Process Point. You can prevent a process from running during subsequent visits to a page by selecting one of the following options under Run Process:

  • Once for each page visit

  • Once for each session or when reset

Enter the appropriate code for PL/SQL process types. For PL/SQL anonymous block processes, enter the appropriate code under Process. For Clear Cache processes, enter the appropriate code under Source. In the event a process fails, you can optionally define an error message in the Process Error Message field.

Creating Conditional Processes

You can make a process conditional by selecting a condition type and entering an expression under Conditional Processing.

Additionally, you can also make a selection from the When Button Pressed attribute. When you select a button from this list, the process only executes if a user clicks the selected button.

Understanding Branches

A branch is an instruction to go to a specific page, procedure, or URL. For example, you can branch from page 1 to page 2 after page 1 is submitted.

You create a branch by running the Create Page Branch Wizard and specifying Branch Point and Branch Type. The Branch Type defines the type of branch you are creating. For more information about Branch Types, see online Help.

Topics in this section include:

Defining a Branch Point and Action

When you click a standard tab in an application, the Application Express engine sets session state, executes computations, and then links you to the target page. It does not run any processes or explicitly defined branches. In cases where the page is submitted without clicking a tab, the Application Express engine explicitly defines branches to direct users to a subsequent page.

You can control when a branch executes by making a selection from the Branch Point list. Available options include:

  • On Submit: Before Computation - Branching occurs before computations, validations, or processing. Use this option for buttons that do not need to invoke any processing (for example, a Cancel button).

  • On Submit: Before Validation - Branching occurs after computations, but before validations or processing. If a validation fails, page processing stops, a rollback is issued, and the page displays the error. Because of this default behavior, you do not need to create branches to accommodate validations. However, you may want to branch based on the result of a computation (for example, to a previous branch point).

  • On Submit: Before Processing - Branching occurs after computations and validations, but before processing. Use this option to branch based on a validated session state, but before performing any page processing.

  • On Submit: After Processing - Branching occurs after computations, validations, and processing. This option branches to a URL or page after performing computations, validations, and processing. When using this option, remember to sequence your branches if you have multiple branches for a given branch point.

  • On Load: Before Header - Branching occurs before a page is rendered. This option displays another page instead of the current page or redirects the user to another URL or procedure.

Depending upon the Branch Type you select, you can specify the following additional information in the Action attributes:

  • The page number of the page to which you want to branch

  • PL/SQL procedure which ultimately renders a branch target page

  • A URL address

Branching Conditionally

Like other controls, branches can be made conditional. To create a conditional branch, make a selection from the Condition Type list, and enter text in the expression fields to implement the condition type you choose.

Editing Page Attributes

Page attributes control specific characteristics of a page such as the page name, display attributes such as the page title and the associated page template, header text, and the selected authorization scheme. You access page attributes from the Page Definition.

Topics in this section include:

Accessing Page Attributes

To edit page attributes:

  1. Navigate to the Page Definition. See "Accessing a Page Definition".

  2. Under Page Rendering, locate the Page section.

    Description of pg_def_edit_pg_att.gif follows
    Description of the illustration pg_def_edit_pg_att.gif

    The Page Attributes page is divided into categories that control specific page attributes such as the Page Name, Title, HTML Header, HTML Body, Help Text, Templates, and so on.

  3. To edit page attributes you can either:

    • Click the Edit page attributes icon to access the entire Page Attributes page. This icon resembles a small page with a pencil on top of it.

    • Click a specific link. The specific information appears.

    Tip:

    Clicking the Edit page attributes icon is the only way to view all page attributes at once.

    The Page Attributes page appears. Required values are marked with a red asterisk (*).

About the Page Attributes Page

The Page Attribute page is divided into the following sections: Name, Display Attributes, Header and Footer, HTML Header, HTML Body Attributes, Security, Duplicate, Cache, Configuration, Error, Help, and Comments.

Description of pg_att_nav.gif follows
Description of the illustration pg_att_nav.gif

You can access these sections by scrolling down the page, or by clicking a navigation button 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.

The topics that follow describe the specific sections of the Page Attributes page.

Name

Use these attributes to define general attributes for the current page such as a page name, an optional alphanumeric alias, and associated page groups. Table 5-3 describes these attributes.

Table 5-3 Page Attributes: Name

Attributes Descriptions

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: "Grouping Pages"


Display Attributes

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

Table 5-4 Page Attributes: Display Attributes

Attributes Descriptions

Page Template

Select a page template to control the appearance of this page. Making a selection here overrides the default page template defined within the current theme.

See Also: "Changing the Default Templates in a Theme"

Standard Tab Set

Select a standard tab set to be used for this page. A standard tab set is associated with a specific page and page number. You can use standard tabs to link users to a specific page.

See Also: "Creating Tabs"

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 tag <TITLE></TITLE>.

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.


Header and Footer

Use these attributes to define page header, body header, body footer, and page footer text. Table 5-5 describes these attributes.

Table 5-5 Page Header, Footer and Text Attributes

Attribute Description

Header Text

Enter text or HTML you want to appear immediately following the page header.

Footer Text

Enter text or HTML you want to appear before page template footer.


HTML Header

Use HTML Header to replace the #HEAD# substitution string in the page template header. The values entered here are inserted after the HTML <HEAD> tag. Common uses of these attributes:

  • Code page-specific inline cascading style classes

  • Add additional style sheets for a specific page

  • Code page-specific JavaScript

  • Code page-specific meta tag page refresh

For Include Standard CSS and JavaScript, select Yes to suppress the inclusion of cascading style sheet (CSS) and JavaScript files in the HTML Header. Because suppressing the display of these files breaks typical applications, enabling this attribute is only recommended for advanced developers.

HTML Body Attributes

Use this attribute to add events when the page is being loaded, such as calls to JavaScript. In the Page HTML Body attribute, enter JavaScript or text to be substituted for your page template's #ONLOAD# substitution string. To use this feature, your page template must include the #ONLOAD# substitution string.

You can use the Page HTML Body attribute to write into the contents of the opening <body> tag. A typical page template might use #ONLOAD# within the opening <body> tag as shown in the following example:

<html>
<head>
...
</head>
<body #ONLOAD# >

Security

Use these attributes to specify an authorization scheme and authentication requirements for the current page. Table 5-6 describes these attributes.

Table 5-6 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 will not 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"

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"

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

Cache

Use these attributes to enable caching for the current page. Enabling page caching can improve application's performance and works well for static pages. Table 5-7 describes these attributes.

Table 5-7 Cache Attributes

Attribute Description

Cache Page

Specify whether to enable page caching by selecting Yes or No. Page caching can improve performance because the page displays from cache instead of displaying dynamically.

Cache Timeout

Specify the amount of time for which a cached page remains valid.

Cache by User

Specify if the page should be cached by user. If Yes, the page is cached specifically for each user. If No, the same cached page is used for all users.

Cache Page Condition

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

Expression 1

Enter values in this attribute based on the specific condition type selected.

Expression 2

Enter values in this attribute based on the specific condition type selected.


See Also:

"Managing Cached Regions and Pages" in Oracle Application Express Administration Guide and "Utilizing Region Caching"

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 run time. Conversely, if you specify an attribute as being excluded, then the Application Express engine treats it as if it did not exist.

On Error Text

Use this attribute to specify the error text that displays in the #NOTIFICATION_MESSAGE# template substitution string in the event an error occurs on the page.

See Also:

"Page Templates"

Help

Use this attribute to enter Help text for the current page.

Help text is displayed using a help system that you must develop. To show the Help for a specific page, call the APEX_APPLICATION.HELP procedure from a page that you create for displaying Help text. For example, you could use a navigation bar icon similar to:

f?p=4000:4600:&APP_SESSION.::&DEBUG::LAST_STEP:&APP_PAGE_ID.

Page-level help supports shortcuts using the following syntax:

"SHORTCUT_NAME"

Comments

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

About the Developer Toolbar

The Application Express engine dynamically renders and processes pages based on data stored in database tables. To view a rendered version of your application, you run or submit it to the Application Express engine by clicking the Run icon.

When you run an application from within the development environment, the Developer toolbar appears at the bottom of the page. The Developer toolbar offers a quick way to edit the current page, create a page, region, or page control, view session state, or toggle in and out of Debug mode. You can control whether the Developer toolbar displays by changing the Status attribute on the Edit Definition page.

Description of d_toolbar.gif follows
Description of the illustration d_toolbar.gif

The Developer toolbar consists of the following links:

Working with Shared Components

Shared components are common elements that can display or be applied on any page within an application. You can use the tools and wizards on the Shared Components page either at the application-level or on specific pages.

Topics in this section include:

Accessing the Shared Components Page

To access the Shared Components page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application home page, click Shared Components.

    The Shared Components page appears.

  5. To create a shared component, select the appropriate link.

Using the Shared Components Icon

You can also access the Shared Components page by clicking the Shared Components icon on the Action bar. The Action bar resembles a small mechanical gear and displays beneath the Utilities tab in the upper right corner of most pages in Application Builder.

Description of shared_comp_icon.gif follows
Description of the illustration shared_comp_icon.gif

About the Shared Components Page

The following sections describe each link on the Shared Components page.

Application

The following section describes the links under Application.

Definition

Links to the Edit Application Definition page. Use this page to edit attributes that determine the application name, application availability, and static substitution strings. You can also use this page to define other attributes such as build options or an application logo and view associated templates and component defaults. See "Configuring the Application Definition".

Comments

Use Application Comments to enter comments specific to the currently selected application. See "Adding Application Comments"

Logic

The following section describes the links under Logic.

Application Items

Application-level items do not display, but are used as global variables to the application. Commonly, you set the value of a page-level item using an application or page computations. See "Understanding Application-Level Items".

Application Processes

Use application processes to run PL/SQL logic:

  • At specific points for each page in an application

  • As defined by the conditions under which the process is set to execute

  • Upon the creation of a new session

Note that On Demand processes execute only when called from a page-level On Demand process. See "Understanding Application Processes".

Application Computations

Use application-level computations to assign values to application and page-level items for each page displayed or upon the creation of a new application session. You can also create an application-level computation and execute it conditionally on multiple pages. See "Understanding Application Computations".

Web Service References

Web service references in Application Builder are based on the Simple Object Access Protocol (SOAP). You can create a reference to a Web service and then incorporate it into an application to process data submitted by a form, or to render output in the form or report. See "Implementing Web Services".

Build Options

Use build options to conditionally display or process specific functionality within an application. You can use build options to control which features of an application are turned on for each application deployment. See "Using Build Options to Control Configuration".

Security

The following section describes the links under Security.

Authentication Schemes

Authentication is the process of establishing each user's identity before they can access your application. Authentication may require a user to enter a user name and password or may involve verification of a user's identity or use of a secure key. See "Establishing User Identity Through Authentication".

Authorization Schemes

Authorization restricts user access to specific controls or components based on predefined user privileges. See "Providing Security Through Authorization".

Session State Protection

Session State Protection is a built-in functionality that prevents hackers from tampering with the URLs within your application. URL tampering can adversely affect program logic, session state contents, and information privacy. See "Understanding Session State Protection".

Edit Security Attributes

Use the Edit Security Attributes page to configure general security attributes for all pages within an application. See "Configuring Security Attributes".

Globalization

The following section describes the links under Globalization.

Translate Application

You can develop applications in Oracle Application Express that can run concurrently in different languages. A single Oracle database and Oracle Application Express instance can support an application in multiple languages. Translating an application involves multiple steps. See "About Translating an Application and Globalization Support" and "Understanding the Translation Process".

Text Messages

Text messages are named text strings that can be called from the PL/SQL code you write. This PL/SQL can be anonymous blocks within page processes and page regions, or in packages and procedures. See "Translating Messages".

Edit Attributes

You can develop applications that can run concurrently in different languages. Click this link to specify globalization options such as the Application Primary Language and Application Language Derived From attributes. See "Configuring Globalization Attributes" and "About Translating an Application and Globalization Support".

Navigation

The following section describes the links under Navigation.

Tabs

Tabs are an effective way to navigate users between pages in an application. You can create two types of tabs: standard tabs or parent tabs. A standard tab set is associated with a specific page and page number. A parent tab set functions as a container to hold a group of standard tabs. See "Creating Tabs".

Lists

A list is a shared collection of links. You control the appearance of a list through list templates. Each list element has a display condition that enables you to control when it displays. See "Creating Lists".

Breadcrumbs

Breadcrumbs provide users with hierarchical navigation. A breadcrumb is a hierarchical list of links that display using templates. You can display a breadcrumb as a list of links or as a breadcrumb path. See "Creating Breadcrumbs".

Trees

A tree is an effective way to communicate hierarchical or multiple level data. See "Creating Trees".

Navigation Bar Entries

Navigation bar entries offer users a simple navigation path for moving between pages in an application. The location of a navigation bar depends upon the associated page template. Navigation bar entries can display as a link from an image or text. A navigation bar entry can be an image, an image with text beneath it, or text. See "Creating a Navigation Bar Entry".

User Interface

The following section describes the links under User Interface.

Themes

A theme is a named collection of templates that defines the application user interface. See "Managing Themes".

Templates

Templates control the look and feel of specific constructs within your application, such as pages, regions, items, and menus. See "Customizing Templates".

User Interface Defaults

User interface defaults enable you to assign default user interface properties to a table, column, or view within a specified schema. When you create a form or report using a wizard, the wizard uses this information to create default values for region and item properties.

Because user interface defaults are associated with a table, you can use them with applications created using the form and report wizards. See "Managing User Interface Defaults".

Lists of Values

A list of values (LOV) is a static or dynamic set of values used to display a popup list of values, select list, check box, or radio group. See "Creating Lists of Values".

Shortcuts

Use shortcuts to avoid repetitive coding of HTML or PL/SQL functions. You can create a shortcut to define a page control such as a button, HTML text, a PL/SQL procedure, or HTML. Once you define a shortcut, it is stored in a central repository so you can reference it from various locations within your application. See "Using Shortcuts".

Reports

The following section describes the links under Reports.

Report Queries

Use the Report Queries link to view a report of stored queries within the current application. See "About Report Queries".

Report Layouts

Use Report Layouts with a report or shared query to render data in a printer-friendly format, such as Adobe Portable Document Format (PDF), Microsoft Word Rich Text Format (RTF), or Microsoft Excel (XLS) format. See "About Report Layouts".

Files

The following section describes the links under Files.

Cascading Style Sheets

Application Builder includes themes that contain templates that reference their own cascading style sheets (CSS). Use the Cascading Style Sheets link to upload cascading style sheets to your workspace. See "Using Custom Cascading Style Sheets".

Images

Use the Images link to upload images to your workspace. See "Managing Images".

Static Files

Use the Static Files link to upload static files to your workspace. See "Managing Static Files".

About Exporting Shared Components

You can export shared components and page components on the Component Export page. You can also use this wizard to back up a component before editing it or to create an export that functions as a patch to another Oracle Application Express instance.

Topics in this section include:

Exporting Shared Components from the Export Page

To export shared components from the Shared Components page:

  1. Navigate to the Export page:

    1. On the Workspace home page, click the Application Builder icon.

    2. Select an application.

    3. On the Application home page, click Export/Import.

    4. On the Export/Import page, click Export and click Next.

  2. On the Tasks list, click Component Export.

    The Component Export page appears. See "Exporting Application Components".

Exporting Shared Components from the Shared Components Page

To export shared components from the Shared Components page:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application home page, click Shared Components.

    The Shared Components page appears.

  5. On the Tasks list, click Export Application Components.

    The Component Export page appears. See "Exporting Application Components".

Accessing Reports on Shared Components

To access the Shared Components reports:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Tasks list, click Application Reports.

    The Application Reports page appears.

  5. Click Shared Components.

    A variety of application reports appear and are divided into the same categories that appear on the Shared Components page, including:

    • Application

    • Logic

    • Security

    • Globalization

    • Navigation

    • User Interface

    • Reports

    • Files

    Note that you can also navigate to these reports by clicking View Application Reports on the Tasks list on the Application home page.

Understanding Application Processes

Application processes are blocks of PL/SQL logic that are set to run at specific points using processes from multiple pages of an application. By default, application processes execute at the same point for every page in the application. However, you can apply conditions for specific pages to control when the process executes.

Topics in this section include:

About On Demand Application Processes

A special type of application process is the On Demand process. An On Demand application process has a Process Point of On Demand and executes when called from a page-level On Demand process. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.

Running an On Demand Process from a Page Request

You can have a page request run an On Demand process by using the following syntax:

f?p=application_id:page_id:session:APPLICATION_PROCESS=process_id

Where:

  • application_id is the application ID or alphanumeric alias

  • page_id is the page number or alphanumeric alias

  • session is the session ID

  • APPLICATION_PROCESS=process_id is the keyword APPLICATION_PROCESS= followed by either the process ID or an alphanumeric name of an application-level process having a Process Point of On Demand

When you use this syntax, the Application Express engine recognizes the request and processes it using the following rules:

  • The page number in the URL can be any page number or alias. A page number or alias is required in the request only as a syntactic placeholder because no specific page is accessed for this type of request.

  • The process authorization scheme, the application's authorization scheme, and the process conditions are supported.

  • Session state (that is, item names and values) may be set in the URL, but clear cache options are ignored.

  • Any failures of authentication, authorization, or process conditions do not result in visible error messages or other indicators of such failures and most often result in a blank page being displayed.

  • Specifying the process by name locates the first process with the specified (case-preserved) name.

Application Process Example

A shopping cart application is a good example of when you might use an application process. For example, suppose you need to display the contents of a user's shopping cart with each page view. To accomplish this, you create a region on page zero of your application that displays the values of the application-level items TOTAL_CART_ITEMS and TOTAL_PURCHASE_PRICE.

Instead of writing a process for each page to set the values of TOTAL_CART_ITEMS and TOTAL_PURCHASE_PRICE, you could write an application process of type On Load: Before Header to compute these values. Then, the Application Express engine would execute the process on each page as it renders the application. As a result, each page, would display the most current values for TOTAL_CART_ITEMS and TOTAL_PURCHASE_PRICE.

Creating an Application Process

To create an application process:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Logic, select Application Processes.

  3. Click Create.

  4. For Identification:

    1. Name - Enter a name for the application process.

    2. Sequence - Specify the sequence number for this process. The sequence number determines the order in which the process will be evaluated relative to other processes.

    3. Point - Identify the point at which this process executes.

    4. Click Next.

  5. For Source:

    1. Process Text - Enter the text that is to be the source of your process.

    2. Error Message - Enter the error message that displays if the process raises an error.

    3. Click Next.

  6. For Conditionality:

    1. Condition Type - Select a condition type that must be met in order for this process to execute.

    2. Expression 1 and Expression 2 - Use these attributes to conditionally control whether the process executes. Enter values in this attribute based on the specific condition type you select. The process will execute if the specified condition is met.

    3. Click Create Process.

About the Application Process Page

Once you create an application process, it appears on the Application Processes page. You control how the page displays by making a selection from the View list. Available options include:

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

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

Accessing Application Processes Reports

After you create an application process, you can access the Utilization and History reports.

To access application processes reports:

  1. Navigate to the Workspace home page.

  2. Click Application Builder.

  3. Select an application.

  4. On the Application home page, click Shared Components.

  5. Under Logic, select Application Processes.

  6. Select one of the following tabs at the top of the page:

    • Utilization

    • History

  7. Follow the on-screen instructions.

Utilization

Click Utilization to display the Application Process Utilization page. This page displays application processes used in the current application.

History

Click History to display the Application Process History page. This page displays a history of recently changed application processes by date.

Understanding Application Computations

Application Computations are units of logic that set the value of a single page or application-level item and are run at the same point across multiple pages in an application. Like page-level computation, application computations can be based on static values, item values, PL/SQL, or SQL.

Topics in this section include:

About Application Computations

A common use of an application item is to store the value of the last page viewed in the application. By storing the value in an item, you can add a back button and then redirect the user to the page number captured by the computation. This type of computation works well, for example, when you need to enable users to back out of an error page.

The following is an example of a computation that stores the last page visited. In this example, the computation:

  • Stores the last application page visited to an item named LAST_PAGE

  • Checks that the value of a CURRENT_PAGE_ITEM is of type PL/SQL Function Body with a Computation body of:

    BEGIN
       :LAST_PAGE := nvl(:CURRENT_PAGE,:APP_PAGE_ID);
       :CURRENT_PAGE := :APP_PAGE_ID;
       RETURN :LAST_PAGE;
    END;
    

About Application Computations that Execute On New Instance

Typically an application computation runs at the same point across multiple pages in an application. The exception is computations having a Computation Point of On New Instance. This type of computation only runs when a user first accesses your application. This type of computation is useful when you need to only retrieve information once within a user's session (for example, to retrieve a user's job title).

Creating an Application Computation

To create an application computation:

  1. Navigate to the Shared Components page:

    1. On the Workspace home page, click Application Builder.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

  2. Under Logic, select Application Computations.

  3. Click Create.

  4. Under Item:

    1. Sequence - Specify the sequence for this component. The sequence determines the order of evaluation.

    2. Computation Item - Select the item this computation affects.

  5. For Computation Point, select a process point at which this computation should be performed. Selecting After Submit causes the computation to be performed only after the page is displayed and then submitted.

  6. Under Computation:

    1. Computation Type - Select the manner in which this computation will be performed.

    2. Computation - Enter the computation logic that corresponds to the computation type.

    3. Computation Error Message - Enter the error message that displays if the computation fails.

  7. For Authorization Scheme (optional), select an authorization scheme which must evaluate to True in order for this computation to execute.

  8. Under Conditions:

    1. Condition Type - Select a condition type that must be met in order for this computation to execute.

    2. Expression 1 and Expression 2 - Use these attributes to conditionally control whether the computation executes. Enter values in this attribute based on the specific condition type you select. The computation will execute if the specified condition is met.

  9. For Build Option (optional), select a build option for this component. See "Using Build Options to Control Configuration".

  10. Click Create.

About the Application Computations Page

Once you create an application computation, it appears on the Application Computations page. You control how the page displays by making a selection from the View list. Available options include:

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

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

Accessing the Application Computation History Report

Once you create an application computation, you can view the Application Computation History report.

To access the Application Computation History report:

  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 Logic, select Application Computations.

  6. Select the History tab at the top of the page.

    This Application Computation History report displays a history of recently changed application computations by date.