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

Part Number E10499-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

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

6 Building an Application

This section describes how to use Application Builder to build an application and application components. It includes instructions for creating an application and adding pages as well as adding components (reports, charts, or forms), page controls (buttons, items, list of values), and shared components (breadcrumbs, lists, or tabs).

This section contains the following topics:

See Also:

"Using Application Builder", "Controlling Page Layout", and "Adding Navigation"

Creating an Application

An application is a collection of pages that share a common session state and authentication. You create a new application in Application Builder using a wizard. You delete an application from the Application home page.

Topics in this section include:

Tip:

You can reduce the number of steps needed to create a new application by configuring Application Builder Defaults. See "Leveraging Application Builder Defaults" in Oracle Application Express Administration Guide.

About Creating an Application Using a Wizard

When you click Create on the Application Builder home page, you must choose one of the following options:

  • Create Application. Creates an application. The application can be based on SQL queries or database tables. You can define blank pages or pages that contain reports, forms, tabular forms, or a report with a linked form. See "About the Create Application Wizard".

  • Create Application from Spreadsheet. Creates an application based on spreadsheet data. You can upload or paste spreadsheet data to create a table and then add a user interface. In the resulting application, users can create queries, add, insert, or update records, or analyze the data. See "About the Create Application from SpreadsheetWizard".

  • Demonstration Application. Installs or uninstalls demonstration applications. Use demonstration applications to learn how to build applications. See "About Demonstration Applications".

About the Create Application Wizard

The Create Application wizard enables you to create a fully functional application based on any number of tables. You can use the Create Application Wizard to create blank pages, or pages based on SQL queries or database tables. You can create SQL queries by manually typing SQL, or by using the graphical user interface of Query Builder.

Applications based on tables can consist of a simple report, a form and report, or a tabular form. When creating pages on tables, you have the option to generate analysis pages. Analysis pages extend a simple report or a report on a form to include multiple drill-down reports and charts.

At the workspace level, you have the option of setting defaults that are used for applications built in that workspace. Setting these defaults enables you to exit the wizard without paging through each step. When you exit the wizard, the application you create uses the values you specified as defaults.

See Also:

"Building Queries with Query Builder"in Oracle Application Express SQL Workshop and Utilities Guide and "Leveraging Application Builder Defaults" in Oracle Application Express Administration Guide

Topics in this section include:

Creating an Application Based on Tables or Queries

You can create an application based on a table, query, or drill-down query by selecting Create Application in the Create Application Wizard.

To create an application based on a table, query, or drill-down query:

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

  2. Click the Create button.

  3. For Method, select Create Application and click Next.

  4. For Name, enter the following and click Next:

    1. Name - Enter a name to identify the application.

    2. Application - Enter a unique integer value to identify the application.

    3. Create Application - Select a creation method:

      • Select From scratch to manually add all pages

      • Select Based on existing application design model to copy page definitions from a previous application model.

        Note that you will still have to define all other application attributes, or you can choose to copy some attributes by choosing to copy shared components from another application (See step 7 and "About Application Models and User Interface Defaults").

    4. Schema - Your application will obtain its privileges by parsing all SQL as a specific database schema. Identify the database schema owner.

    Next, add pages to your application.

  5. For Pages:

    1. Select the type of page you want to add. Options include:

      • Blank creates a page with no built-in functionality.

      • Report creates a page that contains the formatted result of a SQL query. You can choose to build a report based on a table you select, or based on a custom SQL SELECT statement or a PL/SQL function returning a SQL SELECT statement that you provide.

      • Form creates a form to update a single row in a database table.

      • Tabular Form creates a form to perform update, insert, and delete operations on multiple rows in a database table.

      • Master Detail creates a form that displays a master row and multiple detail rows within a single HTML form. With this form, users can query, insert, update, and delete values from two tables or views.

      • Report and Form builds a two page report and form combination. On the first page, users select a row to update. On the second page, users can add a new record or update or delete an existing record.

      Action displays the currently selected page type. For each selection, the wizard prompts you for a different types of information, such as selecting a table name or report implementation.

      Report pages include the Include Analysis Pages check box. Select this option and follow the wizard prompts to extend a simple report or a report on a form to include multiple drill-down reports and charts.

    2. Click Add Page.

      The page (or pages) appear at the top of the page. To delete a page, click Delete icon.

    3. Repeat the previous steps until all pages have been added.

    4. Click Next.

      Tip:

      To exit this wizard early and utilize Application Builder Defaults, click the Create button. To configure Application Builder Defaults, see "Leveraging Application Builder Defaults" in Oracle Application Express Administration Guide.
  6. For Tabs, determine whether to include tabs in your application and click Next.

  7. For Shared Components, determine whether to import shared components from another application. Shared components are common elements that can display or be applied on any page within an application.

    To include shared components, select the following:

    1. Copy Shared Components from Another Application - Select Yes.

    2. Copy from Application - Select the application from which you want to import shared components.

    3. Select Components to Import - Select the components to import.

    4. Click Next.

    Next, select a default authentication scheme. Authentication is the process of establishing users' identities before they can access an application. See "Establishing User Identity Through Authentication".

  8. For Authentication Scheme, select one of the following:

    • Application Express - Uses the user account credentials created and maintained with the Application Express Service Administration application. These are the accounts you use to log in to the Application Express development environment. You can also create accounts in this user account repository for end users of your applications.

    • No Authentication - Also known as database authentication, this option enables users to access your application using the account credentials stored in the modplsql DAD definition. In most cases this results in users not having to login when accessing your application. This is the quickest way to create a "public" application.

    • Database Account - Requires users logging into your application to enter a database schema name (or user name) and a password in order to authenticate. This account information is managed entirely within the Oracle database.

  9. Next, select the following globalization preferences:

    1. Language - Select the primary language for this application.

      This attribute identifies the language in which an application is developed. This language is the base language from which all translations are made.

    2. User Language Preference Derived From - Specifies how the engine determines the application language. The application primary language can be static (that is, derived from the Web browser language) or determined from a user preference or item. The database language setting determines date display and sorting characteristics.

      You can alter the Language and User Language Preference Derived From attributes later on the Edit Globalization attributes page. See "Configuring Globalization Attributes".

    3. Date Format - Specifies the date format to be used in the application.

      This date format is used to alter the NLS_DATE_FORMAT database session setting prior to showing or submitting any page within the application. This value can be a literal string containing a valid Oracle date format mask or an item reference via substitution syntax. If no value is specified, the default date format will be derived from the database session at runtime. If supplied, this is also used as the date format for any items resulting from columns of type DATE.

    4. Click Next.

  10. For User Interface, select a theme and click Next.

    Themes are collections of templates that can be used to define the layout and style of an entire application. See "Managing Themes".

  11. Confirm your selections and click Create.

About Application Models and User Interface Defaults

The Create Application Wizard is designed with the assumption that the developer may run it multiple times. To facilitate this iterative approach to application development, every time you run the wizard it saves the page definitions to an application model.

Consider the following example. You create a new application by running the Create Application Wizard. After viewing the application, you realize it is not quite what you wanted. Instead of altering it, you can run the wizard again and select an application model. By selecting an existing application model when you rerun the wizard, you can quickly improve your application with minimal time and effort.

See Also:

"Managing Application Models" in Oracle Application Express Administration Guide

Another way to increase your productivity when creating an application is to specify user interface defaults. User interface defaults are metadata that enable you to assign default user interface properties to a table, column, or view within a specified schema.

Leveraging Application Models and User Interface Defaults

You can increase your productivity when creating applications by leveraging application models and user interface defaults. Consider the following scenario:

  1. Create an application based on tables or views by running the Create Application Wizard.

  2. Run the generated application. Note any functional deficiencies.

  3. Evaluate whether to create or edit user interface defaults.

    For example, you can use user interface defaults to control how form field or report labels display. You can also utilize user interface defaults to display specific columns or have columns display in an alternate order.

  4. Navigate to the Application home page and create a new application by clicking Create.

  5. Select Create Application.

  6. When prompted to enter application details, specify the following:

    1. Name - Enter a name to identify the application.

    2. Application - Enter a unique integer value to identify the application, or accept the default.

    3. Create Application - Select Based on existing application design model.

  7. Select an application model.

    Note the pages you previously created already appear.

  8. Add pages, edit pages, or remove pages.

  9. Complete the wizard.

  10. Repeat steps 2 through 9 until the application meets your functional requirements.

About the Create Application from Spreadsheet Wizard

You can create an application based on spreadsheet data by selecting Create from Spreadsheet in the Create Application Wizard.

To create an application from spreadsheet data:

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

  2. Click the Create button.

  3. Select Create from Spreadsheet.

  4. For Load Method, specify how spreadsheet data will be uploaded. Select one of the following and click Next:

    1. Upload file, comma separated (*.csv) or tab delimited. Specify the following and click Next:

      • Text File - Click Browse to locate the file to be uploaded.

      • Separator - Specify the column separator character. Use \t for tab separators.

      • Optionally Enclosed By - Enter a delimiter character. You can use this character to deliminate the starting and ending boundary of a data value. If you specify a delimiter character, the wizard ignores white space occurring before the starting and ending boundary of a data value. You can also use this option to enclose a data value with the specified delimiter character.

      • File Character Set - Choose the character set in which the text file is encoded.

    2. Copy and paste. Copy and paste the tab delimited data you wish to import.

  5. For Table Properties, review how your table will display and click Next. Specify the table name and column names, or modify the data types. To specify whether or not to include a column, make a selection from the Upload list.

  6. For User Interface Defaults:

    1. Review the displayed Singular Name and enter a Plural Name.

    2. (Optional) Under Column User Interface Defaults, review the displayed column labels.

    3. Click Next.

  7. For Summary Page:

    1. Summary By Column - Select the columns for which data will be summarized in reports and charts and click Next.

    2. Aggregate By Column - Select columns for which values will be aggregated in summary report and click Next.

  8. For Application Options, specify the following:

    1. Application Name - Enter an alphanumeric name for this application.

    2. Create Mode:

      • Read and Write includes insert and update pages.

      • Read Only does not include insert and update pages.

    3. Report Implementation - Choose Classic to create a SQL report or Interactive to create an interactive report.

    4. Select a chart type.

    5. Click Next.

  9. For User Interface Theme, select a theme and click Next.

    Themes are collections of templates that can be used to define the layout and style of an entire application. See "Managing Themes".

  10. Confirm your selections and click Create.

See Also:

"Building Queries with Query Builder" in Oracle Application Express SQL Workshop and Utilities Guide

See Tutorial:

"How to Build an Access Control Page" in Oracle Application Express Advanced Tutorials

About Demonstration Applications

Oracle Application Express installs with a number of demonstration applications. Use these applications to learn more about the different types of functionality you can include in your applications.

See Also:

"Running a Demonstration Application", "Disabling the Creation of Demonstration Applications in a New Workspace" in Oracle Application Express Administration Guide, and "Downloading Public Packaged Applications and Sample Code in Oracle Database 2 Day + Oracle Application Express Developer's Guide

Accessing Demonstration Applications

To access demonstration applications:

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

  2. Click the Create button.

  3. Select Demonstration Application.

    The Demonstration Applications page appears, displaying links to the following applications:

    • Sample Application offers a working demonstration that highlights basic design concepts

    • Collection Showcase demonstrates shopping cart concepts

  4. To install a demonstration application, locate the application you want to install and click Install.

  5. Follow the on-screen instructions.

    The Application home page appears.

  6. To run an installed demonstration application, click the Run link.

  7. Enter the appropriate login credentials and click Login.

    • For Sample Application:

      • For User Name, enter either demo or admin

      • For Password, enter current workspace name in lowercase letters

    • For other demonstration applications, enter your workspace user name and password.

Copying an Application

To copy an application:

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

  2. Select an application.

    The Application home page appears.

  3. Click Copy this Application on the Tasks list. See "About the Tasks List".

  4. On Copy Application:

    1. Enter a new application ID.

    2. Enter a new application name.

    3. Specify whether or not to copy deployment attributes.

    4. Click Next.

  5. Click Copy Application.

Deleting an Application

You can delete an application from within Application Builder, or while editing application attributes. If you delete an application you also delete all defined components (reports, charts, or forms), page controls (buttons, items, list of values), and shared components (breadcrumbs, lists, and tabs, but not user interface defaults).

Topics in this section include:

Deleting an Application from Application Builder

To delete an application from Application Builder:

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

  2. Select an application.

  3. When Application Builder appears, verify the application ID and name at the top of the page.

  4. On the Tasks list, click Delete this Application.

  5. When prompted, click Permanently Delete Now.

Deleting an Application from the Edit Definition Page

To delete an application from the Edit Definition page:

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

  2. Select an application.

  3. Click Shared Components.

    The Shared Components page appears.

  4. Under Application, click Definition.

    The Edit Definition page appears.

  5. Verify the application ID and name.

  6. Click Delete at the top of the page.

  7. When prompted, click Permanently Delete Now.

Managing Pages in an Application

A page is the basic building block of an application. When you build an application in Application Builder, you create pages that contain user interface elements, such as tabs, lists, buttons, items, and regions.

Topics in this section include:

About Creating Pages

You add a new page or add a component to an existing page by running the Create Page Wizard. You can access this wizard by:

Note:

You can also use the Create Page Wizard to add a component (that is, a report, chart, form, wizard, a calendar, or tree) to an existing page. When prompted, specify an existing page number.

Creating a Page from the Application Home Page

To create a new page from the Application home page:

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

  2. Select an application.

    The Application home page appears.

  3. Click the Create Page button.

  4. Select the type of page you want to create as described in the following table.

    Page Type Description
    Blank Page Creates a blank page.
    Multiple Blank Pages Creates multiple blank pages.
    Report Formatted result of a SQL query. Available options:
    • SQL Report - Creates a report based on a custom SQL SELECT statement or a PL/SQL function returning a SQL SELECT statement that you provide.

    • Interactive Report - Creates an interactive report based on a custom SQL SELECT statement you provide. Users can alter the layout of report data by selecting specific columns, applying filters, highlighting, and sorting. They can also define breaks, aggregations, different charts, and their own computations.

    • Report on Web Service Result - Creates a report on a Web Service result.

    • Wizard Report - Creates a report without requiring any SQL knowledge. Select the appropriate schema, table, columns, and result set display.

    See Also: "Creating Reports" and "Implementing Web Services"

    Chart Enables you to create three types of graphical charts: HTML, Scalable Vector Graphics (SVG), and Flash.

    See Also: "Creating Charts"

    Form Creates a form interface with which users can update a single row or multiple rows within a table.

    See Also: "Creating Forms"

    Wizard Create a wizard.
    Calendar Generates a calendar with monthly, weekly, and daily views.

    See Also: "Creating Calendars"

    Tree Creates a a tree to graphically communicate hierarchical or multiple level data.

    See Also: "Creating Trees"

    Login Page Creates a login page.

    See Also: "Building a Login Page"

    Access Control Creates a page containing a access control list, enabling developers to control access to an application, individual pages, or page components.

    See Also: "Controlling Access to Applications, Pages, and Page Components"

    Page Zero A page zero that functions as a master page. The Application Express engine renders all components you add to page zero on every page within your application. You can further control whether or not the Application Express engine renders a component or runs a computation, validation, or process by defining conditions.

    See Also: "Displaying Components on Every Page of an Application"


  5. Follow the on-screen instructions.

Creating a Page from the Page Definition

To create a new page while viewing a Page Definition:

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

  2. Click the Create button at the top of the page.

  3. Select the type of page you want to create:

    • New Page

    • Region on this page

    • Page control on this page

    • Shared Control

    See "About Create Page Types".

  4. Follow the on-screen instructions.

About Create Page Types

When you run the Create Page Wizard, you select a page type. Table 6-1 describes available create page options based on the type of page you select.

Table 6-1 Create Page Options

Create Page Options Available Selections

New Page

Available page types:

Region on this page

Regions function as containers for content. Available region types:

  • HTML

  • Multiple HTML

  • Report

  • Form

  • Chart

  • List

  • Breadcrumb

  • PL/SQL Dynamic Content

  • Tree

  • URL

  • Calendar

  • Help Text

See Also: "Understanding Regions" and "About Region Types"

Page control on this page

Page controls:

Shared control

Shared component options:


Creating a Page from the Developer Toolbar

To view a rendered version of your application, you run or submit it to the Application Express engine by clicking the Run or Run Application icon.

When you run an application, the Developer toolbar appears at the bottom of the page. The Developer toolbar offers a quick way to edit the current page, create a new page, region, or page control, view session state, or turn edit links on and off. You can control whether the Developer toolbar displays by changing the Status attribute on the Edit Definition page.

See Also:

"Configuring the Application Definition" for information on the Status list

To create a new page from the Developer toolbar:

  1. Run the application. See "Running a Page or Application".

  2. On the Developer toolbar, click Create.

    The New Component Wizard appears.

  3. Select the type of component you want to create and click Next. Available options include:

  4. Follow the on-screen instructions.

Copying a Page

You can copy a page from the current application or from another application. During the copy process, you can also copy shared components or change mappings to shared components in the target application.

To copy a page:

  1. Navigate to the application you want to copy to:

    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.

  2. Click the Copy button.

  3. For Copy Page Option, select one of the following:

    • Page in this application

    • Page in another application

  4. Follow the on-screen instructions.

Running a Page or Application

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. As you create new pages, you can run them individually, or run an entire application. You can run an application by clicking the Run Application icon.

Topics in this section include:

About the Run Application and Run Page Icons

The Run Application icon resembles a large traffic light and displays on the Application home page. Clicking the Run Application icon runs an entire application.

Description of run_ico_sm.gif follows
Description of the illustration run_ico_sm.gif

The Run Page icon resembles a small, light green traffic light and displays in the upper right corner of many pages within Application Builder. Clicking the Run Page icon runs the current page.

Description of run_ico_green.gif follows
Description of the illustration run_ico_green.gif

Running an Application from the Application Builder Home Page

To run an entire application from the Application Builder home page:

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

  2. From the View list, select Details and click Go.

  3. Locate the application in the Applications list.

  4. Click the Run icon in the far right column.

Running an Application from the Application Home Page

To run an entire application from the Application home page:

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

    The Application Builder home page appears.

  2. Select on application.

  3. Click the Run Application icon at the top of the page.

Running a Page on the Application Home Page

You can control how the Application home page displays by making a selection from the View list on the navigation bar at the top of the page. Selecting Details displays each page as a line in a report. Each line includes the page number, the page name, when the page was last updated, who last updated the page, a lock icon, and a Run icon.

To run a page from the Pages list:

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

  2. Select an application.

  3. From the View list, select Details and click Go.

  4. From the Pages list, locate the page you want to run and click the Run icon in the far right column.

Running a Page from the Page Definition

To run a specific page from the Page Definition:

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

  2. Select an application.

  3. Select a page.

    The Page Definition appears.

  4. Click the Run Page icon in the upper right corner of the page.

Grouping Pages

You can make the pages within your application easier to access by organizing them into page groups. To use page groups, you create a group and then assign pages to the group.

Page groups do not have any function other than to help developers organize their application pages.

Topics in this section include:

Viewing Page Groups

The section describes different ways to view page groups.

Accessing the Page Groups Page

To access the Page Groups page:

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

  2. Select the application.

  3. On the Tasks List on the right side of the page, click Page Groups.

    The Page Groups page appears.

    Use the Navigation bar at the top of the page to search for a page group by name or change the page display. You can change the default display by making a selection from View list. Available options include:

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

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

  4. To view the pages associated with a group, click Report Page Groups on the Tasks list.

    Note:

    The Tasks list only appears if groups currently exist.
  5. To edit the group name and description, click the group name.

Viewing Page Groups from the Application Home Page

To view page groups from the Application home page:

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

  2. On the Application Builder home page, select an application.

  3. From the View list, select by Group and click Go.

    Any defined groups appear. Pages not associated with a group are filed in the Unassigned folder.

    Description of groups.gif follows
    Description of the illustration groups.gif

  4. To view the pages within a group, click the group name.

Viewing Page Groups from the Page Definition

To view page groups from the Page Definition:

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

  2. From the View list, select Groups and click Go.

  3. Make a selection from the Tasks list on the right side of the page.

Creating a Page Group

To create a page group:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

  4. On the Page Groups page, click Create.

  5. Enter a name, a description (optional), and click Create.

Accessing a Page Group Definition

When you create page group you specify a name and description.

To edit the Page Group definition:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

    Page Groups page appears.

  4. Select a page group.

  5. On the Page Group page, edit the name or description and click Apply Changes.

  6. To move to the next Page Group definition, click the Previous (<) and Next (>) buttons and repeat the previous step.

Assigning a Page to a Page Group

To assign pages to a group:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

  4. On the Tasks list, click Manage Unassigned.

    The Manage Page Group Assignments page appears. Clicking a page number takes you to the Page Attributes page. Clicking the page Name links to the Page Definition.

  5. From the New Group list, select a group to which you want to assign pages and click Go.

  6. Select the pages to be assigned and click Assigned Checked.

Reassigning a Page to a Another Page Group

To reassign a page to a page group:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

  4. On the Tasks list, click Manage Assignments.

    The Manage Page Group Assignments page appears. Clicking the page number takes you to the Page Attributes page. Clicking the page Name links to the Page Definition.

  5. From the Group list, select a group and click Go.

  6. From New Group, select a group to which you want to assign pages.

  7. Select the pages to be reassigned and click Assigned Checked.

Removing a Page from a Page Group

To remove a page to a page group:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

  4. On the Tasks list, click Manage Assignments.

    The Manage Page Group Assignments page appears. Clicking the page number takes you to the Page Attributes page. Clicking the page Name links to the Page Definition.

  5. From the Group list, select a group and click Go.

  6. Under Name, locate the Group list and select - Unassign -.

  7. Select the page to be removed.

  8. Click Apply Changes.

Deleting a Page Group

To remove a page group:

  1. Remove all pages from the group to be deleted. See "Removing a Page from a Page Group".

  2. Access the Page Group page. See "Accessing a Page Group Definition".

  3. Click Delete.

    A confirmation page appears.

  4. Confirm your request.

Viewing the Pages by Page Group Report

To view pages by page group:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Groups.

  4. On the Tasks list, click Report Page Groups.

    The Pages by Page Group report appears. Clicking the page number takes you to the Page Attributes page. Clicking the Page Name links to the Page Definition.

  5. To view a page group, make a selection from the Group list and click Go.

Locking and Unlocking a Page

You can prevent conflicts during application development by locking pages in your application. By locking a page, you prevent other developers from editing it.

Topics in this section include:

Determining If a Page Is Locked

A lock icon indicates whether a page is currently locked. If a page is unlocked, the icon appears as an open padlock. If the page is locked, the icon appears as a locked padlock. A lock icon appears on the Application home page and on the Page Definition.

To view the lock icon on the Application home page, select Details from the View list. A list of pages appears. The lock icon appears under the Lock column.

Description of lock_ico.gif follows
Description of the illustration lock_ico.gif

The lock icon also appears on the Action Bar on the Page Definition. See "About the Action Bar".

Locking a Page

You can lock pages from the Page Locks page, the Pages list, and from a Page Definition.

Locking a Page from the Page Locks Page

To lock a page from the Page Locks Page:

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

  2. Select an application.

  3. On the Tasks List on the right side of the page, click Page Locks.

    The Page Locks page appears.

  4. Select the appropriate pages and click Lock Checked.

  5. Enter a comment in the Comment field.

  6. Click Lock Page(s).

Locking a Page from the Details View

To lock a page from the Details view:

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

  2. Select an application.

  3. From the View list, select Details and click Go.

  4. In the Pages list, locate the page you want to lock and click the Lock icon.

  5. Enter a comment in the Comment field.

  6. Click Lock Page(s).

Locking a Page from the Page Definition

To lock a page from the Page Definition:

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

  2. Click the Lock icon in the Action bar. See "About the Action Bar".

  3. Select the selected page and click Lock Checked.

  4. Enter a comment in the Comment field.

  5. Click Lock Page(s).

Unlocking Pages

Only the developer who locked a page can unlock it. However, a developer with administrative privileges can unlock pages locked by other developers.

Unlocking Pages from the Page Locks Page

To unlock a page from the Page Locks page:

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

  2. Select the application.

  3. On the Tasks List on the right side of the page, click Page Locks.

    The Page Locks page appears.

  4. Select the appropriate pages.

  5. Click UnLock Checked.

Unlocking Pages from the from the Details View

To unlock a page from the Details view:

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

  2. Select an application.

  3. From the View list, select Details and click Go.

  4. In the Pages list, locate the page you want to unlock and click the Lock icon.

    The Edit Lock Comment page appears.

  5. Click UnLock.

Unlocking Pages from the Page Definition

To unlock pages from the Page Definition:

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

  2. Click the Lock icon in the upper right corner above Shared Components.

    The Page Locks page appears.

  3. Select the page you want to unlock and click Unlock Checked.

Accessing Alternative Locked Pages Views

You can access a number of different views of Locked Pages on the Locked Pages page.

To access different views of locked pages:

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

  2. Select the application.

  3. On the Tasks List on the right side of the page, click Page Locks.

  4. On the Tasks list, click one of the following:

    • Show Locked Pages displays only locked pages within the current application.

    • Show All Pages displays all pages within the current application.

    • Show Unlocked Pages displays only unlocked pages within the current application.

    • Administer Locks enables an administrator to unlock any pages locked by a developer.

Deleting a Page

You can delete a page from the Page Definition or while editing page attributes.

Topics in this section include:

Deleting a Page from the Page Definition

To delete a page from the Page Definition:

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

  2. Verify the page name.

  3. Click the Delete button at the top of the page.

  4. Follow the on-screen instructions.

See Also:

"Editing a Page Definition" for information about editing page attributes

Deleting a Page While Editing Page Attributes

To delete a page while editing page attributes:

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

  2. Under Page Rendering, locate the Page section.

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

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

    The Edit Page appears.

  4. Verify the page number and page name.

  5. Click Delete.

  6. Follow the on-screen instructions.

Adding Application Comments

You can add comments concerning an entire application on the Application Comments page. You could add a description of the application or track the developers involved in working on the application.

Topics in this section include:

Creating an Application Comment

To create an application comment:

  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. Under Application, click Comments.

    The Application Comments page appears.

  6. Enter comments in the Comments field and click Apply Changes.

Viewing the Application Comments Report

To view reports specific to an application:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

    The Application home page appears.

  4. On the Tasks list, click Application Reports.

  5. Click Shared Components and then Application Comments.

Adding Developer Comments

You can add developer comments to an application, a page, or a group of pages using the Developer Comment icon. The Developer Comment icon resembles a green balloon. This icon displays on the Action bar.

Description of comment_ico.gif follows
Description of the illustration comment_ico.gif

You can use developer comments to communicate application changes, report issues, or record developer suggestions.

This section contains the following topics:

Adding Developer Comments to an Application or Page

The Developer Comment icon displays on any page in Application Builder that is related to a specific application or application page. You can add developer comments to an application, a page, or a group of pages.

To add a developer comment:

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

  2. Select an application.

  3. Click the Developer Comment icon.

    The Create Comment page displays in a separate window.

  4. In Relevant Page(s), specify the pages to which the comment applies. To enter a comment that:

    • Applies to a specific page, enter the page number.

    • Applies to multiple pages, enter a comma-delimited list of pages. For example:

      1, 2, 3 
      
    • Does not apply to a page or group of pages, leave this field blank.

  5. In Comment, enter up to 4000 characters of text.

  6. Click Create or Create Another.

Viewing and Editing Developer Comments

To edit a developer comment:

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

  2. Select an application.

  3. Click the Developer Comment icon.

    The Create Comment page displays in a separate window.

  4. Click View Comments.

    The View Comments page appears. See "About the Navigation Bar on the View Comments Page".

  5. To edit a comment, click the Edit icon.

    The Edit Comment page appears.

    1. In Relevant Page(s), specify the pages to which the comment applies. To enter a comment that:

      • Applies to a specific page, enter the page number.

      • Applies to multiple pages, enter a comma-delimited list of pages. For example:

        1, 2, 3 
        
      • Does not apply to a page or group of pages, leave this field blank.

    2. In Comment, enter up to 4000 characters of text.

  6. Click Apply Changes.

About the Navigation Bar on the View Comments Page

A navigation bar appears at the top of the View Comments page and contains the following controls:

  • Page. Search for a page number. Enter a page number and click Go. To view all pages, leave the field blank and click Go.

  • Comment. Search for comments. Enter a case insensitive query for comment text and click Go. To view all comments, leave the field blank and click Go.

  • Developer. Limit the display to a specific developer. Select a developer to display and click Go.

  • Display. Determines how comments display. To increase or decrease the number of comments that appear, make a selection from the Display list and click Go.

Deleting Developer Comments

You can delete developer comments on the Edit Comment page or on the Manage Comments page.

Topics in this section include:

Deleting a Specific Developer Comment

To delete a developer comment:

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

  2. Select an application.

  3. Click the Developer Comment icon.

    The Create Comment page displays in a separate window.

  4. Click View Comments.

  5. Locate the comment to be deleted. See "About the Navigation Bar on the View Comments Page".

  6. Click the Edit icon.

    The Edit Comment page appears.

  7. Click Delete.

Deleting Multiple Developer Comments

To delete multiple developer comments:

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

  2. Select an application.

  3. Click the Developer Comment icon.

    The Create Comment page displays in a separate window.

  4. Click Manage Comments.

  5. Select one of the following actions:

    • Delete all comments

    • Delete comments created by a developer

    • Delete comments by date

  6. Follow the on-screen instructions.

About the Developer Comments Report

You can also view, edit, and manage developer comments from the Developer Comments report.

Topics in this section include:

Accessing the Developer Comments Report

To access the Developer Comments report:

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

  2. Select an application.

  3. On the Application home page, click Application Reports on the Tasks list.

  4. Click Shared Components

  5. Under Application Reports, click Developer Comments.

    The Developer Comments report appears.

A navigation bar appears at the top of the page and contains the following controls:

  • Page. Search for a page number. Enter a page number and click Go. To view all pages, leave the field blank and click Go.

  • Comment. Search for comments. Enter a case insensitive query of comment text and click Go. To view all, leave the field blank and click Go.

  • Developer. Limit the display to a specific developer. Select a developer to display and click Go.

  • Date. Limit the display to a specific date. Select a date and click Go.

  • Display. Determine how comments display. To increase or decrease the number of comments that appear, make a selection from the Display list and click Go.

Editing Comments from the Developer Comments Report

To edit a comment from the Developer Comments report:

  1. Navigate to the Developer Comments report. See "Accessing the Developer Comments Report".

    The Developer Comments report appears.

  2. Locate the comment to be edited.

  3. Click the Edit icon.

    The Edit Comment page displays in a separate window.

    1. In Relevant Page(s), specify the pages to which the comment applies. To enter a comment that:

      • Applies to a specific page, enter the page number.

      • Applies to multiple pages, enter a comma-delimited list of pages, for example:

        1, 2, 3 
        
      • Does not apply to a page or group of pages, leave this field blank.

    2. In Comment, enter up to 4000 characters of text.

  4. Click Apply Changes.

Deleting a Comment from the Developer Comments Report

To delete a comment from the Developer Comments report:

  1. Navigate to the Developer Comments report. See "Accessing the Developer Comments Report".

    The Developer Comments report appears.

  2. Locate the comment to be deleted.

  3. Click the Edit icon.

    The Edit Comment page displays in a separate window.

  4. Click Delete.

Deleting Multiple Comments from the Developer Comments Report

To delete multiple comments from the Developer Comments report:

  1. Navigate to the Developer Comments report. See "Accessing the Developer Comments Report".

    The Developer Comments report appears.

  2. Locate the comment to be deleted.

  3. Click the Edit icon.

    The Edit Comment page displays in a separate window.

  4. Click Manage Comments.

  5. Select one of the following actions:

    • Delete all comments

    • Delete comments created by a developer

    • Delete comments by date

  6. Follow the on-screen instructions.

  7. Click Apply Changes.

Downloading the Developer Comments Report

You can download the Developer Comments report as a comma-delimited file (.csv) file by clicking the Export link.

To download the Developer Comments report:

  1. Navigate to the Developer Comments report. See "Accessing the Developer Comments Report".

    The Developer Comments report appears.

  2. Click the Export link at the bottom of the page.

  3. Follow the on-screen instructions.

Creating Applications Groups

You can organize your applications by assigning them to application groups. To use application groups, create a group by clicking the Create button and then assign applications to it.

Topics in this section include:

Viewing Application Groups

The section describes different ways to view application groups.

Accessing the Application Group Page

To access the Application Group page:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

    The Application Group page appears.

    Use the Navigation bar at the top of the page to search for a page group by name or change the page display. You can change the default display by making a selection from View list. Available options include:

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

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

  3. To view the applications associated with a group, you click the group name.

    Note:

    The Tasks list only appears if groups currently exist.

Viewing Page Groups from the Application Builder Home Page

To view page groups from the Application Builder home page:

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

  2. From the View list, select By Group and click Go.

    Any defined groups appear.

    Description of app_group.gif follows
    Description of the illustration app_group.gif

  3. To view or edit a page group, click the group name.

Creating an Application Group

To create an application group:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

  3. On the Application Group page, click Create.

  4. Enter a name, a description (optional), and click Create.

Editing an Application Group Definition

When you create page group you specify a name and description.

To edit an application group definition:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

    Application Group page appears.

  3. Select an application group.

  4. On the Application Group page, edit the a name or a description and click Apply Changes.

Assigning an Application to an Application Group

To assign applications to a group:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

  3. On the Tasks list, click Manage Unassigned.

    The Manage Application Group Assignments page appears.

  4. From the New Group list, select a group.

  5. Select the applications to be assigned and click Assigned Checked.

Tip:

You can also assign an application to an application group by editing the application definition. Select the group from the Application Group list. See "Configuring the Application Definition".

Removing an Application from an Application Group

To remove an application from an application group:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

  3. On the Tasks list, click Manage Unassigned.

    The Manage Application Group Assignments page appears.

  4. From the New Group list, select Unassign.

  5. Select the pages to be unassigned and click Assigned Checked.

Tip:

You can also remove an application from an application group by editing the application definition. Select Unassigned from the Application Group list. See "Configuring the Application Definition".

Deleting an Application Group

To remove an application group:

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

  2. On the Tasks List on the right side of the page, click Application Groups.

  3. Assign all applications in the group to Unassign. See "Removing an Application from an Application Group".

  4. Return to the Application Groups page.

  5. Select the application group to be deleted.

  6. On the Application Group page, click Delete.

    A confirmation page appears.

  7. Confirm your request.

Viewing Application Reports

Application Builder includes over 100 reports that provide a comprehensive view of your application from various perspectives. You can use application reports to achieve consistency among shared components and page components within your application. For example, you can view details about buttons used on all pages within your application. Additionally, many reports are updatable so you can standardize components, such as item and region labels, without navigating to a specific page.

Topics in this section include:

Accessing Application Reports

To view reports specific to an application:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

    The Application home page appears.

  4. On the Tasks list, click Application Reports.

  5. Select a type of report to view:

Shared Components Reports

Shared Components reports offer information on common elements that can display on every page within an application. Reports are grouped by the following categories: including Application, Logic, Security, Globalization, Conditional Components, Navigation, User Interface, and Files. Report examples include Developer Comments, Database Object Dependencies, Application Items, Application Computations, Authentication Schemes, Breadcrumb Entries, and Shortcuts.

About the Database Object Dependencies Report

The Database Object Dependencies report identifies database objects referenced by the current application. Review this report to determine what objects to move when deploying an application.

To view the Database Object Dependencies report:

  1. Navigate to the appropriate application.

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

    2. Select an application.

  2. On the Tasks list, click Application Reports.

  3. Click Shared Components.

  4. Under Application, click Database Object Dependencies.

  5. Click Compute Dependencies.

  6. To view the components that reference a specific database object, select the Reference Count number.

Page Components Reports

Page Components reports offer detailed information on controls and logic that execute when a page is rendered (for example, branches, buttons, computations, items, and regions).

About the Search Region Source Report

Use the Search Region Source report to search through all region source in your application.

To view the Search Region Source report:

  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.

  5. Click Page Components.

  6. Under Regions, click Search Source.

  7. To view the Page Definition for a region, select the page number.

  8. To view region attributes for a region, select the region name.

Activity Reports

Activity reports offer details about developer activity within the current application. Available reports are grouped into the following categories: Page Views, Caching, Developer Activity, and Sessions.

Tip:

You can also access the Activity page by clicking the Activity link on the Developer toolbar. See "About the Developer Toolbar".

About the Page Views by Hour Report

To view the Page Views by Hour report:

  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.

  5. Click Activity.

  6. Under Page Views, click By Hour.

Cross Application Reports

Cross Application reports offer information that apply to multiple applications. Available reports include Application Attributes, Application Comments, Build Options, Build Status and Application Status, Page Component Counts, Security Profiles, Authentication Schemes, and Template Defaults by Application.

About the Application Comparison Report

Use the Application Comparison report to compare two applications.

To view the Application Comparison report:

  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.

  5. Click Cross Application.

    The Application Comparison page appears.

  6. In the navigation bar, specify the following:

    1. Application 1 - Select the first application to compare.

    2. Application 2 - Select the second application to compare.

    3. Component - Select the components to include in the report.

    4. Page - Identify a specific page number to compare.

    5. Show - Select the number of differences to display on each page.

    6. Click Go.

  7. To view only differences, select Show Differences Only and click Go.

  8. To view details, select Show Details and click Go.

Understanding Page-Level Items

An item is part of an HTML form. An item can be a text field, text area, password, select list, check box, and so on. Item attributes affect the display of items on a page. For example, these attributes can impact where a label displays, how large an item will be, and if the item will display next to or below the previous item.

Topics in this section include:

Differences Between Page Items and Application Items

There are two types of items: page items and application items. Page items are placed on a page and have associated user interface properties, such as Display As, Label and Label Template. Examples of page-level items include a check box, date picker, display as text, file browse field, popup list of values, select list, or a text area. Application items are not associated with a page and therefore have no user interface properties. You can use an application item as a global variable.

About the Items Section of the Page Definition

You create and edit page-level items on the Page Definition. The Items section appears in the Page Rendering area.

Description of pg_def_items.gif follows
Description of the illustration pg_def_items.gif

You can temporarily hide all other subsections by clicking the Items icon. To restore the view, click Show All. The Show All icon resembles an inverted triangle.

The following icons display next to the section title:

  • Edit All. The Edit All icon resembles a small grid with a pencil on top of it. Use this icon to edit all items at once. See "Using the Edit All Icon to Edit Multiple Items".

  • Copy. The Copy icon resembles two small overlapping pages. Use this icon to make a copy of an existing item.

  • Create. The Create icon resembles a plus (+) sign overlapping a small page. Click this icon to create a new item.

Items are organized by region. To edit an item, click the item name.

About the Drag and Drop Icon

You can quickly change the appearance of a page by clicking the Drag and drop icon to access the Drag and Drop Layout page. The Drag and drop icon resembles a green rectangle and displays to the right of the Reorder Region Items icon.

Description of drag_drap_ico.gif follows
Description of the illustration drag_drap_ico.gif

You can use the Drag and Drop Layout page to interactively reorder items within a given region, change select item attributes, create new items, or delete existing items. See "Using the Drag and Drop Layout Page".

About the Reorder Items Icon

You can quickly edit the label and position of items in a region by clicking the Reorder Region Items icon on the Page Definition. This icon resembles a light green down or up arrow.

Description of reorder_items.gif follows
Description of the illustration reorder_items.gif

Creating Page-Level Items

Topics in this section include:

Creating a Page-Level Item on the Page Definition

You create a page-level item by running the Create Item Wizard from the Page Definition.

To create a new page-level item:

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

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. Under Items, click the Create icon.

  4. Select an item type. See "About Item Types".

  5. Follow the on-screen instructions.

  6. To learn more about a specific field, click the field label.

    When help is available, the item label changes to red when you pass your cursor over it, and the cursor changes to an arrow and question mark. See "About Field-Level Help".

About Item Naming Conventions

When specifying an item name, remember the following rules. Item names must:

  • Be unique within an application

  • Not have quotation marks

  • Begin with a letter or a number, and subsequent characters can be letters, numbers, or underscore characters

  • Be case-insensitive

  • Should not exceed 30 characters

  • Cannot contain letters outside the base ASCII character set

About Item Types

When you create an item, you specify an item type. Once you create an item, these types appear on the Display As list on the Edit Page Item page. Table 6-2 describes available item types.

Table 6-2 Available Item Types

Item Type Description

Check Box

Displayed using a list of values. A list of values is required for items displayed as check boxes. The value corresponding to a checked box is returned in a single colon-delimited string.

The following example demonstrates how to create a single check box that returns YES. This example would display both a check box and a field label.

SELECT NULL display_text, 'YES' return_value FROM DUAL;

This example includes the additional text Click to select.

SELECT 'Click to select' display_text, 'YES' return_value FROM DUAL;

See Also: "APEX_UTIL" in Oracle Application Express API Reference for information about breaking up returned values

Date Picker

Displays a text field with a Calendar icon next to it. When clicked, this icon displays a small calendar where the user can select a date and a time (optional).

If the format you need is not included in the Display As list, select Date Picker (use application format mask) or Date Picker (use item format mask). The latter uses the value from the Format Mask field in the Source section of the Edit Page Item page.

Display Only

Available Display As Text subtypes include:

  • Display as Text (does not save state) - Displays the item's source value on the page without creating a form item.

  • Display as Text (escape special characters, does not save state) - Displays the item's source value with special characters ('<','>','&') escaped.

  • Display as Text (saves state) - Displays the item's source value and creates a form item that gets submitted with the page to pass the value into session state.

  • Display as Text (based on LOV, does not save state) - Displays the display value from an LOV by matching the item's source value with the LOV's return value.

  • Display as Text (based on LOV, saves state) - Same as the previous option, but also generates a form item that gets submitted with the page to pass the return value into session state.

File Browse

Displays a text field with a Browse... button. This enables the user to locate a file on a local file system and upload it. Oracle Application Express provides a table for these files to be uploaded to as well as an API to retrieve the files.

See Also: "Understanding the Security Risks of File Upload Tables"

Hidden

Renders an HTML hidden form element. Session state can be assigned and referenced just like a text field.

Hidden and Protected

Renders an HTML hidden form element. Session state can be assigned and referenced just like a text field. For maximum security use Hidden and Protected instead of Hidden unless your page has client-side behavior, for example, JavaScript that alters the item value after the page is rendered by Oracle Application Express.

List Manager

Based on a list of values. This item enables you to manage a list of items by selecting and adding to a list. The list of values display as a popup.

Multiple Select

Renders as a multiselect HTML form element. When submitted, selected values are returned in a single colon-delimited string. You can break up the values using the APEX_UTIL API.

See Also: "Working with a Multiple Select List Item" and "APEX_UTIL" in Oracle Application Express API Reference

Password

Renders as an HTML password form element.

Popup List of Values

Renders as a text field with an icon. When the user clicks the icon, a popup window appears with one of these, depending on the popup selection you make:

  • List of values represented as a series of links - When the user makes a selection from the list, the selected value is placed in the text field.

  • Color picker - When the user makes a selection from the palette, the HTML value for the color selected (for example, #000000 for black) is returned.

With the exception of the color picker, you control popup lists of values through templates. You can only specify one popup list of values (LOV) template for each application. A popup LOV is a good choice for lists of values that are too large to return on a single page.

There are two types of Popup LOVs: one that fetches a set of rows when the window pops up and one that does not. Available popup LOVs include:

  • Popup Key LOV (Displays description, returns key value)

  • Popup Key LOV No Fetch (Displays description, returns key value without pre-fetch)

  • Popup LOV (fetches first rowset and filters)

  • Popup LOV (fetches first rowset)

  • Popup LOV (no fetch)

  • Popup Color Picker

Popup LOVs must be based on a query that selects two columns with different column aliases. For example:

SELECT ename name, empno id 
   FROM emp

If one of the columns is an expression, remember to use an alias. For example:

SELECT ename||' '||job display_value, empno FROM emp

Radio

Renders as an HTML radio group form element, based on a list of values. Choose Radiogroup with Submit to have the page submitted when the radio button is selected.

The following example displays employee names (ename), but returns employee numbers (empno):

SELECT ename, empno FROM emp

Select List

Displays using a list of values. A list of values is required for items displayed as a select list. Select lists are rendered using the HTML form element <select>. The values in a select list are determined using a named list of values or a list of values defined at the item level. You can specify the NULL display value and NULL return value.

The following example would return employee names (ename) and employee numbers (empno) from the emp table. Note that column aliases are not required and are included in this example for clarity.

SELECT ename display_text, empno return_value FROM emp

Oracle Application Express provides additional enhancements to a standard HTML select list:

  • Select List with Submit - Submits the page when the user changes its selected value. Upon submit, the REQUEST will be set to the name of the item that represents the select list, allowing you to execute conditional computations, validations, processes, and branches.

  • Select List with Redirect - Redirects the user back to the same page, setting ONLY the newly selected value of the select list in session state.

  • Select List Returning URL Redirect - Based on a list of values with URLs as the return values. Changing the value of the select list causes the browser to redirect to the corresponding URL.

  • Select List with Branch to Page - Based on a list of values with page numbers as return values. Changing the selected value in the select list causes the Application Express engine to branch to the corresponding page.

Note: Long select lists can cause errors. If you have a long select list that generates an error, try using a Popup List of Values instead.

Shuttle

Renders as a multiple select list that includes two boxes containing lists. The left list displays a source list of values. Users use the shuttle control icons and buttons to select list items and move them from the left (source) list to the right (destination) list. Each shuttle has five controls:

  • Move all - Moves all items in the source list to the destination list.

  • Move selected - Moves only selected items (Ctrl + Shift items) to destination list.

  • Remove selected - Moves only selected items (Ctrl + Shift items) to the source list.

  • Remove all - Moves all items on destination list back to the source list.

  • Refresh - Resets the source and destination lists.

The right destination list includes the sort controls Move to top, Move up, Move down, and Move to bottom.

Note: In order to create this item type, you must define a list of values. See "Creating a Static List of Values", "Creating Lists of Values", and "Working with a Multiple Select List Item".

Text

Displays as an HTML text field containing a maximum of 30,000 bytes of text. You control the maximum length and display width by editing the Height and Width item attribute.

Available Text display options include:

  • Text Field - Renders as a text field.

  • Text Field (Disabled, does not save state) - Displays a read-only version of a display value from a list of values by using the item's value in session state to look up the corresponding display value in the associated list of values. The value displayed on the screen is not saved in session state upon submit.

  • Text Field (Disabled, saves state) - Displays a read-only version of a display value from a list of values by using the item's value in session state to look up the corresponding display value in the associated list of values.

  • Text Field (always submits page when Enter pressed) - Displays a read-only version of the value in session state. Upon submit, the value displayed is saved in session state.

  • Text Field with Calculator Popup - Renders as a text field with an icon next to it. When clicked, the icon displays a small window containing a calculator. Calculations are placed back in the text field.

Text Area

Renders as an HTML text area. There is no maximum length for an item displayed as a text area. You control the height and width by editing the Height and Width item attribute. Additional available Text Area Display As options include:

  • Text Area

  • Text Area (auto height) - Varies the height based on the amount of text. Use this option to scale the text area to the amount of data.

  • Text Area with Counter - Includes a counter that displays the number of bytes entered in the field.

  • Text Area with Spell Checker - Provides a popup English language spell checker.

  • HTML Editor Minimal - Provides basic text editing features, including the application of bold, italics, and underline styles, the ability to create numbered and bulleted lists, and indentation.

  • HTML Editor Standard - Provides more editing functionality, such as font, format and color, than HTML Editor Minimal.

  • Text Area with HTML Editor - Provides basic text formatting controls. Note that these controls may not work in all Web browsers.

Stop and Start Table

Forces the close of an HTML table using the </table> tag and starts a new HTML table. You can use this item type to reset the column width in the middle of the region.

Note that a Stop and Start Table item only displays its label. You can prevent the label from displaying at all by setting it to null. To do this, you simply remove the default label.


Creating Multiple Items Using Tabular Form

To create multiple items simultaneously:

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

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. Under Items, click the Create icon.

    The Create Item wizard appears.

  4. At the bottom of the page, click the Create multiple Items Using Tabular Form link.

  5. On the Create Multiple Items page, specify the following:

    1. Create Item(s) in Region - Select the region to contain the items.

    2. Item Template - Select an item template.

    3. For each item, enter the Sequence, Name, Label, Type and specify whether the item should be cached.

  6. Click Create Multiple Items.

Creating Multiple Items Using Drag and Drop

To create multiple items using the Drag and Drop Layout page:

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

  2. If necessary, create an HTML region. See "Understanding Regions".

  3. Under Items, click the Create icon.

    The Create Item wizard appears.

  4. At the bottom of the page, click the Create multiple Items Using Drag and Drop Layout link.

    The Drag and Drop Layout page appears.

  5. Select an item from the palette on the left side of the page and drag it to the appropriate position on the page.

  6. Edit the item attributes at the of the page.

    1. Display Name - Enter an item name. Use this name retrieve the value of the item. Item names longer than 30 characters cannot be referenced using bind variable syntax.

    2. Label - Enter the label for this item. You may include HTML, JavaScript, and shortcuts. You can also use the substitution string #CURRENT_ITEM_NAME# to obtain the name of the item associated with this label.

    3. Display Type - Select a display type (if applicable). See "About Item Types".

  7. To edit an existing item, edit the Item Name and Label fields, or select a new Display Type at the top of the page.

  8. Click Next.

  9. Optionally, edit the each item's Name and Label.

  10. Click Apply Changes.

Creating a Static List of Values

One way to create a static list of values is to edit an item's List of Values definition. Note that this type of list of values is not reusable. As a best practice, create a list of values as a shared component whenever possible.

To create a static list of values:

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

  2. Under Items, select the item name.

    The Edit Page Item page appears.

  3. Under Name, specify how the item will be rendered. Make a selection from the Display As list.

  4. Under List of Values, create a static list of values:

    1. From Named LOV, select Select Named LOV.

    2. In List of values definition, enter a definition using the following syntax:

      STATIC[2]:Display Value[;Return Value],Display Value[;Return Value]
      

      Where:

      • The first keyword may be STATIC or STATIC2.

        STATIC results in the values being sorted alphabetically by display value. STATIC2 results in the values being displayed in the order they are entered in the list.

      • A semicolon separates the display value from the return value in each entry.

      • Return Value is optional. If a Return Value is not included, the return value is the same as the display value.

  5. To learn more, see item Help. To view help for a specific item on a page, click the item label.

    When help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  6. Click Apply Changes.

    The examples that follow demonstrate syntax for three different static LOVs.

Example 1: Four Values Displayed in Alphabetical Order

In this example, the list of values has four values (Cow, Dog, Cat, and Lion) that display in alphabetical order. The return value of each entry equals the display value.

STATIC:Cow,Dog,Cat,Lion
Example 2: Ten Values Displayed in the Order Listed

In this example, the list of values has ten values that display in the order listed in the definition. The return value of each entry equals the display value.

STATIC2:10,15,20,25,50,100,200,500,1000,10000
Example 3: A List of Values with Having Both a Return and Display Value

In this example, the list of values has two values: Yes and No (the display value Yes and its return value Y, and the display value No and its return value N).

STATIC:Yes;Y,No;N

See Tutorial:

"How to Control Form Layout" in Oracle Application Express Advanced Tutorials

Editing Page-Level Items

You can edit page-level items by editing page item attributes or using the Edit All or Reorder Items icons.

Topics in this section include:

Editing Page Item Attributes

Once you create a page item, you can edit it on the Edit Page Item page.

To edit page item attributes:

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

  2. Under Items, select the item name.

    The Edit Page Item page appears.

  3. To learn more about a specific attribute on a page, click the attribute label.

    When help is available, the item label changes to red when you pass your cursor over it, and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  4. Click Apply Changes.

See Also:

"How Item Attributes Affect Page Layout" and "About Cross-Site Scripting Protection"
About Navigation Alternatives

The Edit Page Item page is divided into the following sections: Name, Displayed, Label, Element, Source, Default, List of Values, Security, Conditions, Read Only, Help Text, Configuration, and Comments.

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.

Using the Edit All Icon to Edit Multiple Items

You can edit multiple items at once by clicking the Edit All icon on the Page Definition. The Edit All icon resembles a small grid with a pencil on top of it.

Description of edit_all_item.gif follows
Description of the illustration edit_all_item.gif

Clicking the Edit All icon displays a series of pages that enable you to edit multiple items simultaneously or view a history of recent changes.

Topics in this section include:

Page Items

Item attributes control how items display on a page. You can use the Page Items page to edit the sequence, field label, template, region, and overall position for all items on a page.

A Navigation bar displays at the top of the page. Use the Page field to navigate to another page. To limit the display to just items in a specific region, make a selection from Show Regions list.

The Page Items page displays items in an editable report. Table 6-3 describes each editable attribute.

Table 6-3 Editable Attributes on Page Items

Attribute Description

Sequence

Specify the display sequence for this component. The sequence determines the order of evaluation.

Prompt

Enter the label for this HTML form element. You may include HTML, JavaScript, and shortcuts. You can also use the substitution string #CURRENT_ITEM_NAME# to obtain the name of the item associated with this label.

Field Template

Determines the a label template. Label templates enable you to define the user interface attributes in a central place and share that definition among many labels.

Region

Defines the region in which the item displays. All items must be in a region.

New Line

Determines whether this item displays on the same line as the previous item or whether it displays on the next line. Items are laid out in an HTML table. Select Yes to have an item display as the first field in a new row in the table.

Width

Specifies the length (in characters) of the form element that displays for this item.

Height

Specifies the height (in lines) for text areas and multi select lists.

Column Span

Items are laid out in HTML tables. This property defines the value to be used for the COLSPAN attribute in the table cell.

Row Span

Items are laid out in HTML tables. The attribute determines the value to be used for the ROWSPAN attribute in the table cell that the item displays in.


Edit the appropriate attributes and click Apply Changes.

Item Help

Use the Item Help page to edit item help for all items on a page. You can avoid repeating the same Help text in multiple locations by subscribing to another item.

To edit item Help:

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

  2. Under Items, click the Edit All icon.

  3. Click Item Help.

    The Item Help page appears.

    Use the Navigation bar at the top of the page to narrow or broaden the display. Available options include:

    • Page - Select or enter a new number and click Go.

    • Search - Enter a case insensitive query and click Go.

    • Show - Select whether to display All, Subscribed, or Unsubscribed Help text.

    • All Pages - Select to run the search query on all pages in the application.

    • Current Page - Select to restrict the search query to the current page.

      You can also use the arrows in the Navigation bar to scroll through the application pages.

  4. To subscribe to an existing Help item, make a selection from Subscribed To.

  5. To edit help for a specific item, click the item name.

    On the Edit Help page:

    1. Reference Master Item Help From - (Optional) Select a existing item Help topic to subscribe to.

    2. Help Text - Enter or edit the Help text for this item.

    3. Click Apply Changes.

  6. Click Apply Changes.

Reassign Region Items

Use the Reassign Region Items page to assign items to a new region.

To Reassign Region Items page:

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

  2. Under Items, click the Edit All icon.

  3. Click Reassign Region Items.

    The Reassign Region Items page appears.

    Use the Navigation bar at the top of the page to narrow or broaden the display. Available options include:

    • Page - Select or enter a new number and click Go.

    • Show Regions - Select a region to display and click Go.

  4. To reassign an item to another region:

    1. Select the items to reassign.

    2. From Assign to Region, select a new region.

    3. Click Reassign Region Items.

Delete Multiple Items

Use the Delete Multiple Items page to delete multiple items at once.

To delete multiple items:

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

  2. Under Items, click the Edit All icon.

  3. Click Delete Multiple Items.

    The Delete Multiple Items page appears.

    Use the Navigation bar at the top of the page to narrow or broaden the display. Available options include:

    • Page - Select or enter a new number and click Go.

    • Show Regions - Select a region to display and click Go.

    • Forward (>) and Next (<) buttons - Display the previous and next page.

  4. To reassign an item to another region:

    1. Select the items to reassign.

    2. From Assign to Region, select a new region.

    3. Click Reassign Region Items.

History

Use the History page to view a summary of recent edits to page-level items.

Using the Reorder Region Items Icon

You can quickly edit the label and position of items in a region by clicking the Reorder Region Items icon on the Page Definition. This icon resembles a light green down or up arrow.

To use the Reorder Region Items icon:

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

  2. Under Items, click the Reorder Region Items icon.

    The Reorder Region Items page appears with items laid out in tables. You can edit the position of an item by selecting values for New Line, New Field, Column Span, and Label Alignment attributes. Note that a graphical representation of how the items display appears at the bottom of the page.

  3. To edit an item label, enter a new title in the Label field.

  4. To change the position of an item, edit the following attributes:

    • New Line. Determines if the item displays on the same line as the previous item, or displays on the next line. Select Yes to have an item display as the first field in a new row in the table.

    • New Field. Determines if the item displays in the next column or in the same column as the previous item. Select Yes to have the label and value for the item display in a new HTML table cell. Use this attribute in combination with the New Line and Span attributes to control layout.

    • Column Span. Defines the value to be used for the COLSPAN attribute in the table cell. The COLSPAN attribute defines the number of columns that it spans across the table.

  5. To change label alignment, make a new selection from the Label Alignment list.

  6. To change the order in which items display, click the up and down arrows in the far right column. Clicking the arrow moves the item one row up or down.

    Note that the order you specify here translates to sequence number in the Sequence attribute on the Edit Page Item page. See "Editing Page Item Attributes".

  7. Click Apply Changes.

Tip:

You can also use the Drag and Drop Layout feature to reorder items. See "Using the Drag and Drop Layout Page".

Note:

To change the region in which an item resides, you must edit the item attributes. See "Editing Page Item Attributes".

Using the Drag and Drop Layout Page

You can use the Drag and Drop Layout page to interactively reorder items within a given region, change select item attributes, create new items, or delete existing items.

Topics in this section include:

Accessing the Drag and Drop Layout Page

You access the Drag and Drop Layout page by either:

About the Drag and Drop Layout Page

The Drag and Drop Layout page is divided into two sections: Item palette and Layout region.

Description of drag_drap_pg.gif follows
Description of the illustration drag_drap_pg.gif

The Item palette displays on the left side of the page. You add new items by clicking an item type on the palette and dragging it to the correct position in the Layout region. Note that when you position the cursor over an item type, a tooltip appears.

Use the right side of the page (or Layout region) to position items. To move an item vertically, click the Add Row button to insert an empty row. Then drag and drop the item into the empty row.

See Also:

"Deleting Items"

Creating a New Item

To create a new item on the Drag and Drop Layout page:

  1. Navigate to the Drag and Drop Layout page. See "Accessing the Drag and Drop Layout Page".

  2. Click an item type in the Item palette on the left side of the page and drag it to the appropriate location in the Layout region.

    Note that when you position the cursor over an item type, a tooltip appears.

  3. You can reposition the item:

    • To move an item horizontally, select the item and drag it to the appropriate position on the page.

    • To insert an existing or new item between two existing rows, click the Add Row button and drag it between the existing rows. This creates an empty row where you can then move the item.

  4. Edit the item attributes at the of the page.

    1. Display Name - Enter an item name. Use this name to retrieve the value of the item. Item names longer than 30 characters cannot be referenced using bind variable syntax.

    2. Label - Enter the label for this item. You may include HTML, JavaScript, and shortcuts. You can also use the substitution string #CURRENT_ITEM_NAME# to obtain the name of the item associated with this label.

    3. Display Type - Select a display type (if applicable). Note that the select list is restricted to options corresponding to the type of item you are creating. See "About Item Types".

  5. Click Next.

  6. Optionally, edit the each item's Name and Label.

  7. Click Apply Changes.

About List of Values

If you create an item that requires a list of values (LOV), the Drag and Drop Layout Wizard creates a static inline LOV for you. Note you must edit and fix this LOV once you complete the layout process.

Editing Existing Items

To edit an existing item on the Drag and Drop Layout page:

  1. Navigate to the Drag and Drop Layout page. See "Accessing the Drag and Drop Layout Page".

  2. To reposition the item:

    • To move an item horizontally, select the item and drag it to the appropriate position on the page.

    • To insert an existing or new item between two existing rows, click the Add Row button and drag it between the existing rows. This creates an empty row where you can then move the item.

  3. If required, select an item and edit its attributes at the of the page.

    1. Display Name - Enter an item name. Use this name retrieve the value of the item. Item names longer than 30 characters cannot be referenced using bind variable syntax.

    2. Label - Enter the label for this item. You may include HTML, JavaScript, and shortcuts. You can also use the substitution string #CURRENT_ITEM_NAME# to obtain the name of the item associated with this label.

    3. Display Type - Select a display type (if applicable). Note that the select list is restricted to options corresponding to the type of item you are creating. See "About Item Types". See "About Item Types".

  4. Click Next.

  5. Optionally, edit the each item's Name and Label.

  6. Click Apply Changes.

Note:

To change the region in which an item resides, you must edit the item attributes. See "Editing Page Item Attributes".

Deleting Items

To delete an item, click it and drag it to the Recycle box at the bottom of the page. If you delete an existing item, it appears in the Recycle box and can be retrieved until you click Apply Changes on the next page. Note that if you drop a new item you have just created in the Recycle box, it instantly disappears and cannot be retrieved.

Referencing Item Values

You can reference item values stored in session state in regions, computations, processes, validation, and branches. Table 6-4 describes the supported syntax for referencing item values.

Table 6-4 Syntax for Referencing Item Values

Type Syntax Description

SQL

:MY_ITEM

Standard bind variable syntax for items whose names are no longer than 30 bytes. Use this syntax for references within a SQL query and within PL/SQL.

PL/SQL

V('MY_ITEM')

PL/SQL syntax referencing the item value using the V function.

See Also: Oracle Application Express API Reference

PL/SQL

NV('MY_NUMERIC_ITEM')

Standard PL/SQL syntax referencing the numeric item value using the NV function.

See Also: Oracle Application Express API Reference

Static Text

&MY_ITEM

Static text.

Static Text (exact)

&MY_ITEM.

Static text. Exact Substitution.


You can set the value of an item in your application using any of the following methods:

Displaying Conditional or Read-Only Page Items

You can choose to have an item display conditionally or as read-only by editing attributes on the Edit Pages Item page.

To display a conditional or read-only item:

  1. Create the item. See "Creating Page-Level Items".

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

  3. Under Items, select the item name.

    The Edit Page Item page appears.

  4. To display an item conditionally:

    1. Scroll down to Conditions.

    2. Make a selection from the Condition Type list.

    3. Enter an expression in the fields provided.

  5. To make an item read-only:

    1. Scroll down to Read Only Display Settings.

    2. Make a selection from the Read Only Condition Type list.

    3. Enter an expression in the fields provided.

  6. Click Apply Changes.

Working with a Multiple Select List Item

A multiple select item renders as a multiple select list form element which can be either a Multiselect List or Shuttle item type. When submitted, selected values are returned in a single colon-delimited string. You can handle values in this format in two ways:

Using APEX_UTIL.STRING_TO_TABLE to Convert Selected Values

Suppose you had a report on the EMP and DEPT tables that is limited by the departments selected from a Department multiple select list. First, you create the multiple select item, P1_DEPTNO, using the following query:

SELECT dname, deptno
FROM dept

Second, you return only those employees within the selected departments as follows:

SELECT ename, job, sal, comm, dname
FROM emp e, dept d
WHERE d.deptno = e.deptno
AND instr(':'||:P1_DEPTNO||':',':'||e.deptno||':') > 0

Next, assume you want to programmatically step through the values selected in the multiple select item, P1_DEPTNO. To accomplish this, you would convert the colon-delimited string into a PL/SQL array using the APEX_UTIL.STRING_TO_TABLE function. The following example demonstrates how to insert the selected departments into an audit table containing the date of the query.

DECLARE
    l_selected APEX_APPLICATION_GLOBAL.VC_ARR2;
BEGIN
  --
  -- Convert the colon separated string of values into
  -- a PL/SQL array 

  l_selected := APEX_UTIL.STRING_TO_TABLE(:P1_DEPTNO);

  --
  -- Loop over array to insert department numbers and sysdate
  --

  FOR i IN 1..l_selected.count 
  LOOP
    INSERT INTO report_audit_table (report_date, selected_department)
        VALUES (sysdate, l_selected(i));
  END LOOP;
END;

See Also:

"STRING_TO_TABLE Function" in Oracle Application Express API Reference

Understanding Application-Level Items

Application-level items do not display, but are used as global variables to the application. You can use an application item as a global variable.

Topics in this section include:

Creating an Application-level Item

To create a new application-level item:

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

    The Application Items page appears.

  6. To create a new application item, click Create.

  7. Follow the on-screen instructions.

About the Application Items Page

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

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

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

Accessing Application Item History

You can view a history of changes to application items by clicking History at the top of the Application Items page.

Editing Application-level Item Attributes

Once you create an application-level item, you can edit it on the Create/Edit Application Item page.

To edit application-level item attributes:

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

    The Application Items page appears.

  6. Select an application item.

    The Create/Edit Application Item page appears.

  7. To learn more about a specific item on a page, click the item label.

    When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

  8. Click Apply Changes.

About Navigation Alternatives

The Create/Edit Application Item page is divided into the following sections: Name, Security, Configuration, and Comments.

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.