| Oracle® Database Express Edition Application Express User's Guide Release 2.1 Part Number B25309-01 |
|
|
View PDF |
This section provides important background information about using Application Builder to build dynamically rendered applications.
This section contains the following topics:
See Also:
An application is a collection of database-driven Web pages linked together using tabs, buttons, or hypertext links. The pages within an application share a common session state definition and authentication method. Application Builder is the tool you use to build the pages that comprise an application.
Note:
The Application Builder icon does not appear when you log in to the Database Home Page as userSYSTEM. It is expected that this user performs administration tasks only. To develop Application Express applications, log in as a user other than SYSTEM.To access Application Builder:
Log in to the Database Home Page user interface.
The Database Home Page appears.
To view the Application Builder home page you can either:
Click the Application Builder icon to link to the Application Builder home page.
Click the down arrow on the right side of the Application Builder icon to view a drop down menu. Then select the appropriate menu option.

Note:
For the purposes of the consistency, this document uses the primary navigation path (or drill-down approach) when explaining navigation.The Application Builder home page displays all installed or recently created applications.

You can use the controls at the top of the Application Builder home page to:
Search for an Application. Enter keywords in the Application field and click Go. To view all applications, leave the Application field blank and click Go. You control how many rows display by making a selection from the Display list.
Change the Page View. By default, each application displays as a large icon. You can change the appearance of the page by making a selection from the View list. Available View options include:
Icons (the default) displays each application as a large icon identified by the application name.
Details displays each application as a line in a report. Each line includes the application ID, the application name, when the application was last updated, the page count, and who last updated the application.
You can control how many applications display by making a selection from the Display list.
Import Application Files. Click Import to import an exported application file.
Create an Application. Click Create to create a new application or install a demonstration application.
Additionally, click an application icon or application name at the bottom of the page to view a specific application.
See Also:
"Importing Export Files", "Installing a Demonstration Application", and "About Creating an Application Using a Wizard"About the Administration Task List
The Administration task list appears on the right side of the Application Builder home page. Use the following links to administer your application development environment:
Manage Services links to the Mange Services page. Use this page to manage session state, log files, preferences, and application models. See "About the Manage Services Page".
Manage Application Express Users links to the Manage Application Express Users page. Use this page to manage Application Express user accounts as well as user groups. See "Managing Application Express End Users" and "Managing Application Express Users Using Groups".
Monitor Activity links to the Monitor Activity page. Use this page to monitor changes to page views and entire applications. See "Monitoring Activity".
Email Configuration links to the Email Configuration page. Use this page to learn how to send email from an Application Builder application. See "How to Send Email from an Application".
About Application Express links to the About Application Express page. See "About Application Express".
To view a specific application, select the application on the Application Builder home page. The Application home page appears. The application ID and the application name display at the top of the page.

The following four large icons appear next:
Run Application submits the pages in the current application to the Application Express engine to render viewable HTML. See "How the Application Express Engine Renders and Processes Pages".
Edit Attributes links to the Application Attributes page where you can access Standard Attributes (attributes common to the entire application), Security Attributes, and Globalization Attributes. See "About Application Attributes".
Shared Components links to a list of shared components and user interface controls that can display or be applied on every page within an application. See "About the Shared Components Page".
Export/Import links you to the Export Import Wizard. Use this wizard to import and export an entire application as well as related files such as cascading style sheets, images, static files, script files, themes, user interface defaults, and workspaces (or database user accounts). "Exporting an Application and Related Files".
A search bar appears in the center of the page and features the following controls:
Page. Search for a page ID or name by entering a case insensitive keyword or phrase in the Page field and clicking Go. To view all pages in an application, leave the Page field blank and click Go. You control how many rows display by making a selection from the Rows list.
View. By default, each page displays as a large icon. You can change the appearance of the page by making a selection from the View list. You can control how many pages display, by making a selection from the Display list. See "Page Display Alternatives".
Create Page. Click the Create Page button to launch a wizard to create a new page. See "Adding Pages to an Application".
About the Tasks List
A Tasks list displays on the right side of the Application home page.

The Task list contains the following links:
Delete this Application deletes the current application. See "Deleting an Application".
Manage Page Groups links to the Page Groups page. Make the pages within your application easier to access by organizing them into page groups. See "Grouping Pages".
Manage Page Locks links to the Locked Pages page. Locking pages in an application prevents conflicts during application development. See "Locking and Unlocking a Page".
View Application Reports displays links to summary application reports. See "Viewing Application Reports".
Page Display Alternatives
You can control how the pages display on the Application home page by making a selection from the View list. Available View options include:
Icons (the default) displays each page as a large icon identified by the page name.
Details displays each page as a line in a report. Each line includes the page ID, the page name, when the page was last updated, and who last updated the page.
This view also includes a Lock and a Run icon. Use the Lock icon to prevent conflicts during application development. Click the Run icon to submit a page to the Application Express engine and render viewable HTML.

Application attributes apply to an entire application. Once you create an application the next logical step is to review and possibly update application attributes.
Topics in this section include:
Standard Application Attributes display on the Edit Application Attributes page. You use these attributes to control the application name and availability as well as defined substitution strings. Additionally, the Edit Application Attributes page displays defined build options, the associated theme, template defaults, and component defaults. Required values are marked with a red asterisk (*).
Topics in this section include:
To edit application attributes:
On the Database Home Page, click the Application Builder icon.
Select an application.
Click Edit Attributes.
The Application Attributes page appears.
Click Edit Standard Attributes.
The Edit Application Attributes page appears.
The following sections describe the attributes available on the Edit Application Attributes page.
Topics in this section include:
Use Name to define basic characteristics of your application, including the application name, an optional alphanumeric alias, a version number, and the application owner. Table 4-1 describes all Name attributes.
Table 4-1 Application Definition Attributes
| Attribute | Description |
|---|---|
|
Provides a short descriptive name for the application to distinguish it from other applications in your development environment. |
|
|
Assigns an alternate alphanumeric application identifier. You can use this identifier in place of the application ID.For example, suppose you create an alias of
|
|
|
Includes the application's version number on a page. You can also automatically tie the version to the date of last modification using the following format masks:
If your application version uses YYYY.MM.DD then Application Builder replaces this format mask with the date of last modification of any application attribute. |
|
|
Determines the virtual path the Web server uses to point to the images directory distributed with Application Builder. During installation, the virtual path is configured as When embedding an image in static text (for example, in page or region headers or footers) you can reference an image using the substitution string <img src="#IMAGE_PREFIX#go.gif">
See Also: "IMAGE_PREFIX", "Managing Images", and "Referencing Images" |
|
|
Use this field to specify a proxy server. For example, you may require a proxy server when using a region source type of URL. The URL region source embeds the results of the URL (that is, the page returned by navigating to the URL) as the region source. If you use a firewall and the target of a URL is outside the firewall relative to Application Builder, you may need to specify a proxy server. You can reference values entered into this field from PL/SQL using the PL/SQL package variable |
|
|
Determines whether or not user activity is recorded in the Oracle Application Express activity log. When set to Yes, every page view will be logged, allowing an administrator to monitor user activity for each application. Disabling logging may be advisable for high volume applications. |
|
|
Specifies the schema that all SQL and PL/SQL in the application will be parsed as. You may use |
|
|
Select whether or not only exact substitutions will be supported. For optimal run-time performance, it is recommended you use exact substitutions. Exact substitutions use the following sytnax: &ITEM. Non-exact substitutions use the following sytnax: &ITEM |
Use Availability attributes to manage your application by defining an application status and build status. For example, if you select the status Restricted Access, you can specify which users have access and can run the application. Table 4-2 describes these attributes.
Table 4-2 Application Availability Attributes
You can use the Global Notifications attribute to communicate system status to application users. For example, you can use this attribute to notify users of scheduled downtime, or communicate other messages regarding application availability. If the page templates used in your application contain the #GLOBAL_NOTIFICATION# substitution string, the text entered here will display in that string's place.
To create a global notification:
Include the #GLOBAL_NOTIFICATION# substitution string in your page template.
Navigate to the Edit Application Attributes page and enter a message in the Global Notifications attribute.
Click Apply Changes.
See Also:
"Using Substitution Strings"Use these fields to define static substitution strings for your application. You can use static substitution string for phrases or labels that occur in many places within an application. Defining static substitution strings centrally enables you to change text strings in multiple places in your application by making a single change to the Substitution Value defined on this page.
See Also:
"Using Substitution Strings"Use these attributes to identify an image to be used as the logo for this application.
In Image, identify the image preceded by the prefix identified in the Image Prefix attribute. The Image Prefix attribute determines the virtual path the Web server uses to point to the images directory distributed with Application Builder. The following example, includes the default prefix /i/:
/i/my_image.gif
If you specify an image in the Image attribute and include the #LOGO# substitution string in your page template, the Application Express engine generates an image tag. Use Logo Image Attributes to specify image attributes for the logo image. For example:
width="100" height="20" alt="Company Logo"
Displays existing build options. Most application attributes have a build option attribute. Do not specify a build option unless you plan to exclude that object from specific installations. Build Options have two possible values: INCLUDE and EXCLUDE. If you specify an attribute to be included, then the Application Express engine considers it at run time. However, if you specify an attribute to be excluded, then the Application Express engine treats it as if it does not exist.
Displays the current theme applied to the application. Themes are collections of templates that can be used to define the layout and style of an entire application. Each theme provides a complete set of templates that accommodate every user interface pattern that may be needed in an application.
See Also:
"Managing Themes"Template Defaults list the default templates for this application. To specify a new template at the application level, you can either:
Select a new theme
Select a new default page template on the Define Theme page
You can also override this default by making a selection from the Page Template list on the Page Attributes page.
Table 4-3 describes template defaults for the current application.
Table 4-3 Application Template Defaults Attributes
| Attribute | Description |
|---|---|
|
Indicates the default page template to display pages. You can override this selection by making a selection from the Page Template list on the Page Attributes page. See Also: "Editing Page Attributes" |
|
|
Identifies the template to be used when the Application Express engine is in printer friendly mode. When calling the Application Express engine to render a page, you have the option to specify whether or not the page should be displayed using the Print Mode Page Template specified. If you specify Yes, then the page displays using a printer friendly template. The Application Express engine displays all text within HTML Form Fields as text. The printer friendly template does not need to have the See Also: "Optimizing a Page for Printing" |
|
|
Optional. Specifies a page template to use for errors that display on a separate page, as opposed to those that display inline. |
Component Defaults identify default templates used when running wizards. You can override these settings on the attributes page for each control or component. Table 4-4 describes component defaults for the current application.
Table 4-4 Component Defaults
| Attribute | Description |
|---|---|
|
Default calendar template used when you create a new calendar. |
|
|
Default label template used when you create new page items. |
|
|
Default report template used when you create new report. |
|
|
Default template used when you create a list. |
|
|
Default template used when you create a breadcrumb. |
|
|
Default template to be used when you create new buttons that are template controlled. |
|
|
Default region template used when you create a new region. |
|
|
Default region template used when you create a chart. |
|
|
Default region template used when you create a form. |
|
|
Default region template used when you create a report. |
|
|
Default region template used when you create a tabular form. |
|
|
Default region template used when you create a new wizard component. |
|
|
Default region template used when you create a new breadcrumb. |
|
|
Default region template used when you create a new list. |
You can provide security for your application by configuring attributes on the Edit Security Attributes page. The Security Attributes you choose apply to all pages within an application.
Topics in this section include:
See Also:
"Managing Application Security"To access the Edit Security Attributes page:
On the Database Home Page, click the Application Builder icon.
Select an application.
Click Edit Attributes.
The Application Attributes page appears.
Click Edit Security Attributes.
The Edit Security Attributes page appears.
The following sections describe the attributes available on the Edit Security Attributes page.
Topics in this section include:
Authentication is the process of establishing users' identities before they can access an application. Although you define multiple authentication schemes for your application, only one scheme can be current at a time. Table 4-5 describes the attributes available under Authentication.
Table 4-5 Authentication Attributes
| Attribute | Descriptions |
|---|---|
|
Specifies an URL or procedure that should be run when you run the application. For example, Home Link could contain the relative URL used to locate the application home page. For example, You can also use this attribute to name a procedure. For example, you could create a procedure such as Note: Do not use the Home Link attribute to determine the page that displays after authentication. The page that displays after authentication is determined by other components within the application's authentication scheme. See Also: "HOME_LINK" |
|
|
Replaces the substitution strings &LOGIN_URL. in HTML or #LOGIN_URL# in templates. See Also: "LOGIN_URL" and "Creating an Authentication Scheme" |
|
|
Identifies the Oracle schema (or user) used to connect to the database through the database access descriptor (DAD). The default value is Once a user has been identified, the Application Express engine keeps track of each user by setting the value of the built-in substitution string
If the current application user ( For example, you can show a login button if the user is the public user and a logout link if the user is not a public user. Reference this value using See Also: "HOME_LINK" and "Understanding Conditional Rendering and Processing" |
|
|
Click this button to define a new authentication scheme. See Also: "Understanding How Authentication Works" and "Creating an Authentication Scheme" |
Authorization controls user access to specific controls or components based on user privileges. You can specify an authorization scheme for your application, by making a selection from the Authorization Scheme list. You can assign only one authorization to an entire application. However, you can assign an authorization scheme to individual pages, page controls (such as a region, a button, or an item), or a shared component (such as a menu, a list, or a tab).
To create a new authorization scheme, click Define Authorization Schemes.
An authorization scheme is a binary operation that either succeeds (equals true) or fails (equals false). If it succeeds, then the component or control can be viewed. If it fails, then the component or control cannot be viewed or processed. When you attach an authorization scheme to a page and it fails, an error message displays instead of the page. However, when you attach an authorization scheme to a page control (for example, a region, a button, or an item) and it fails, no error page displays. Instead, the control either does not display or is not processed or executed.
Use Parsing Schema to specify the database scheme for the current application. Once defined, all SQL and PL/SQL commands issued by the application will be performed with the rights and privileges of the defined database schema.
Enabling Session State Protection can prevent hackers from tampering with URLs within your application. URL tampering can adversely affect program logic, session state contents, and information privacy.
To enable or disable Session State Protection for your application, make a selection from the Session State Protection list. Setting Session State Protection to Enabled turns on session state protection controls defined at the page and item level.
To configure Session State Protection, click Manage Session State Protection.
See Also:
"Understanding Session State Protection"A Virtual Private Database (VPD) provides an application programming interface (API) that enables developers to assign security policies to database tables and views. Using PL/SQL, developers can create security policies with stored procedures, and bind the procedures to a table or view by means of a call to an RDBMS package. Such policies are based on the content of application data stored within the database, or are based on context variables provided by the Oracle database. In this way, VPD permits access security mechanisms to be removed from applications and centralized.
The PL/SQL you enter in this field is executed immediately after the user is authenticated. V('USER') is accessible from this function. Session state for the current call is not yet initialized when this call is made. If your application does not need to employ VPD to support multiple customers in the same database, leave this attribute null.
In Application Builder you can develop applications that can run concurrently in different languages. A single application can be translated to support different languages. Use the attributes on the Edit Globalization Attributes page to specify globalization options such as the primary application language.
Topics in this section include:
See Also:
"Managing Application Globalization"To access the Edit Globalization Attributes page:
On the Database Home Page, click the Application Builder icon.
Select an application.
Application Builder appears.
Click Edit Attributes.
The Application Attributes page appears.
Click Edit Globalization Attributes.
The Edit Globalization Attributes page appears.
The following sections describe the attributes available on the Edit Globalization Attributes page.
Identifies the language in which an application is developed. This language is the base language from which all translations are made. For example, suppose application 100 was authored in English, translated into French, and published as application 101. English would be the Application Primary Language.
All modifications to the application should be made to the primary language specified here.
Specifies how Application Builder determines or derives the application language. The application primary language can be static, derived from the Web browser language, or determined from a user preference or item. The database language setting also determines how the date is displayed and how certain information is sorted.
This option enables you to disable browser derived language support. You also have the option of having the application language derived from an application preference.
Automatic CSV Encoding controls the encoding of all CSV report output in an application. The default value for Automatic CSV Encoding is No. If Automatic CSV Encoding is set to Yes, CSV report output will be properly converted to a character set compatible with localized desktop applications. The character set for the CSV encoding is determined by the Application Language Derived From setting.
The encoding of pages in Application Builder is determined by the character set of the database access descriptor (DAD) used to access the Database Home Page. For example, if the character set of the Database Access Descriptor is AL32UTF8, all pages in all applications in the Database Home Page user interface will be encoded in UTF-8.
By default, the CSV output from report regions is encoded in the same character set as the Database Access Descriptor. However, some desktop spreadsheet applications require that the data is encoded in the client desktop operating system character set. In the case of multibyte data, the CSV output from report regions will often appear corrupted when opened by a desktop spreadsheet application. This is because the CSV output is encoded differently that what is required by the desktop application. Enabling Automatic CSV Encoding resolves this issue.
For example, if the user's language preference for an application is de, the CSV data will be encoded in Western European Windows 1252, regardless of the Database Access Descriptor character set setting. If the user's language preference is zh-cn, the CSV data will be encoded in Chinese GBK.
A page is the basic building block of an application. Each page can have buttons and fields (called items) and application logic (or processes). You can branch from one page to the next using conditional navigation; perform calculations (called computations); perform validations (such as edit checks); and display reports, calendars, and charts. You view, create, and edit the controls that define a page by accessing the Page Definition.
Topics in this section include:
See Also:
"Editing a Page Definition"You can view, create, and edit the controls that define a page by accessing the Page Definition.
To access the Page Definition for an existing page:
On the Database Home Page, click the Application Builder icon.
Application Builder home page appears.
Select an application.
The Application home page appears.
Select a page.
The Page Definition appears.

A breadcrumb trail displays at the top of each Page Definition. Breadcrumb trails appear on every page in the Database Home Page user interface. Each breadcrumb entry indicates your location relative to other pages in the current application and functions as an alternate navigation path. You can instantly go to another page by clicking a breadcrumb entry.

The current page identification number (or ID) displays on the far right side of the page, next to a small icon that resembles a traffic light. This icon is called the Run Page icon. Clicking this icon runs the current page and renders it into viewable HTML.
A page navigation bar appears next. Options available on the page navigation bar include:
Page. Displays the current page identification number (ID). To view another page directly, enter the page ID in the Page field and click Go. To access the previous or next page, click the arrow buttons.
View. Controls the current page view. To view an alternative report, make a selection from the list and click Go. See "Linking to Other Pages from the Page Definition".
Previous and Next. These buttons resemble less than (<) and greater than (>) signs. Click these buttons to move to the previous or next page ID.
Copy. Creates a copy of the current page. You specify a new page ID and page name.
Edit Attributes. Links to Page Attributes. Use this page to edit high-level page attributes such as the page name, an optional name alias, and view information about defined tab sets, specified templates, and defined authorization schemes. See "Editing Page Attributes".
Create. Links to a wizard for creating a new page. See "Creating a Page from the Page Definition".
The page name and last update date display to the right of the page navigation bar.
The center of every Page Definition is divided into three sections:
Page Rendering lists user interface controls and logic that execute when the page is rendered.
Page Processing lists list logic controls (such as computations and processes) that are evaluated and executed when the page is processed.
Shared Components lists common components that can be called from multiple pages in an applications.
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 an off. You can control whether the Developer toolbar displays by changing the Availability Status on the Edit Application Attributes page.
See Also:
"Editing Application Attributes" for information on the Status listThe Developer toolbar consists of the following links:
Edit Application links you to the Application home page. See "About the Application Builder Home Page".
Edit Page accesses the Page Definition for the current running page. See "Editing a Page Definition".
Create links to a wizard for creating a new page, region, page control (item, button, branch, computation, process, or validation), or a shared control (navigation bar icon, tab, list of values, list, or breadcrumb). See "Creating a Page from the Developer Toolbar".
Session displays a new window containing session state information for the current page. See "Viewing Session State".
Debug toggles the page between Debug and No Debug mode. See "Accessing Debug Mode".
Show Edit Links toggles between Show Edit Links and Hide Edit Links. Clicking Show Edit Links displays edit links next to each object on the page that can be edited. Each edit link resembles two colons (::) and appears to the right of navigation bar items, tabs, region titles, buttons, and items. Clicking on the link displays another window in which to edit the object.
A page is the basic building block of an application. Each page has page ID, a name, and typically some text attributes such as a header, title and footer. You add content to your page by creating page controls (regions, items, and buttons). Page templates and page region templates control the exact look and feel of each page.
Topics in this section include:
See Also:
"About the Page Definition"Each Page Definition serves a a central navigation point for all the controls, components, and application logic that define a page.
You can access a summary view of all defined controls or components by selecting the title (for example, Regions, Button, Items, Computations, Processes, and so on). For example, selecting Regions displays a summary report of all currently defined regions on the current page. You can use this summary view to:
Edit the multiple attributes at once by making new selections from the available fields and select lists.
Link to a definition page by clicking the Edit icon.
You can access additional summary views by clicking the buttons at the top of each page. To save your edits to any summary view, click Apply Changes.
You can also view the attributes of a specific control or component by selecting its name on the Page Definition. For example, suppose your Page Definition contains a region named Customers. Clicking the region name Customers would display an attributes page for that region.
You can copy or create new controls or components by clicking the Copy and Create icons. The Create icon resembles a plus (+) sign that overlaps a small page. Click the Create icon to create a new control or component.
The Copy icon resembles two small overlapping pages. Click the Copy icon to make a copy of an existing control or component.
Page attributes only apply to a specific page. You access page attributes from the Page Definition.
To edit page attributes:
Navigate to the Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
At the top of the page, click Edit Attributes.
The Page Attributes page appears. Required values are marked with a red asterisk (*).
The topics that follow describe the specific sections of the Page Attributes page.
See Also:
"Adding Pages to an Application" for information about creating a new pageUse these attributes to define general attributes for the current page such as a page name, an optional alphanumeric alias, and associated page groups. Table 4-7 describes these attributes.
Table 4-6 Page Attributes: Name
| Attributes | Descriptions |
|---|---|
|
Identifies the name of the current page for application developers. This name is used in numerous pages and reports, along with the page ID and page title. |
|
|
Enter an alphanumeric alias for this page. This alias must be unique within the current application. For example, if you were working on page 1 of application 100, you could create an alias called f?p=100:home |
|
|
Identify the page group you would like to associate with this page. Page groups do not affect functionality, but help developers manage the pages within an application. See Also: "Grouping Pages" |
Use these attributes to define general display attributes for the current page such as the selected page template, standard tab set, title, and cursor focus. Table 4-7 describes these attributes.
Table 4-7 Page Attributes: Display Attributes
| Attributes | Descriptions |
|---|---|
|
Select a page template to control the appearance of this page. Making a selection here overrides the default page template defined within the current theme. See Also: "Changing Default Templates in a Theme" |
|
|
Select a standard tab set to be used for this page. A standard tab set is associated with a specific page and page ID. You can use standard tabs to link users to a specific page. See Also: "Creating Tabs" |
|
|
Enter a title to display in the title bar of the browser window. The Application Express engine uses the title you specify here in place of the |
|
|
Select whether or not you want the cursor focus to be placed in the first field on the page. Select Do not focus cursor if you do not want to include JavaScript. |
Use these attributes to define page header, body header, body footer, and page footer text. Table 4-8 describes these attributes.
Table 4-8 Page Header, Footer and Text Attributes
| Attribute | Description |
|---|---|
|
Enter the text of the HTML to display after the page template header and before page template body. |
|
|
Enter the text of the HTML to display before showing regions. Displays before the page template |
|
|
Enter the text of the HTML to display after page template body and before page template footer. |
Use this attribute to replace the #HEAD# substitution string in the page template header. The values entered here are inserted after the HTML <HEAD> tag. Common uses of these attributes:
Use this attribute to add events when the page is being loaded, such as calls to JavaScript. In the Page HTML Body Attribute, enter JavaScript or text to be substituted for your page template's #ONLOAD# substitution string. To use this feature, your page template must include the #ONLOAD# substitution string.
You can use the Page HTML Body attribute to write into the contents of the opening <body> tag. A typical page template might use #ONLOAD# within the opening <body> tag as shown in the following example:
<html> <head> ... </head> <body #ONLOAD# >
Use these attributes to specify an authorization scheme, authentication, and URL access protection for the current page. Table 4-9 describes these attributes
Table 4-9 Page Attributes: Security
| Attribute | Description |
|---|---|
|
Select an authorization scheme to be applied to the page. Authorization schemes are defined at the application level and can be applied to many elements within the application. An authorization scheme is evaluated either once for each application session (at session creation), or once for each page view. If the selected authorization scheme evaluates to true, then the page displays and is subject to other defined conditions. If it evaluates to false, then the page will not display and an error message displays. |
|
|
Specifies whether this page has been defined as public or requires authentication. If a page is identified as public, the page can be viewed before authentication. This attribute only applies if the application uses SCHEME authentication. The application's page sentry function can access this page attribute to identify pages that do not require prior authentication to view. The implementation of the authentication scheme's page sentry function determines if this attribute has any effect. See Also: "Establishing User Identity Through Authentication" |
Use the Allow duplicate page submissions list to specify whether or not users may process a page multiple times in a row. Set this attribute to No to prevent duplicate page submissions from being processed multiple times.
Examples of duplicate page submissions include:
A user clicks the Submit button multiple times.
You create a branch of type Branch to Page, and the user clicks the browser reload button.
Build options allow you to enable or disable functionality. Most application attributes have a build option attribute. Do not specify a build option for the current page unless you plan to exclude the page in certain configurations.
Build options have two possible values: INCLUDE and EXCLUDE. If you specify an attribute as being included, then the Application Express engine considers it part of the application definition at run time. Conversely, if you specify an attribute as being excluded, then the Application Express engine treats it as if it does not exist
Use this attribute to specify the error text that displays in the #NOTIFICATION_MESSAGE# template substitution string in the event an error occurs on the page.
See Also:
"Page Templates"Use this attribute to enter Help text for the current page.
Help text is displayed using a help system that you must develop. To show the Help for a specific page, call the HTMLDB_APPLICATION.HELP procedure from a page that you create for displaying Help text. For example, you could use a navigation bar icon similar to:
f?p=4000:4600:&APP_SESSION.::&DEBUG::LAST_STEP:&APP_PAGE_ID
Page-level help supports shortcuts using the following syntax:
"SHORTCUT_NAME"
Use the Page Rendering section of the Page Definition to specify attributes for defined regions, buttons, items, page rendering computations, and page processes.

Topics in this section include:
See Also:
"About the Page Definition", "Accessing a Summary View of Controls, Components, and Application Logic" and "Copying or Creating a Control or Component"A region is a area on a page that serves as a container for content. Each page can have any number of regions. The content of a region is determined by the region source. For example, a region may contain a report based on a SQL query you define, or it may contain static HTML.
You control the appearance of a region through a specific region template. You can use regions to group page controls (such as items or buttons). You can also create simple regions that do not generate additional HTML, or create elaborate regions that frame content within HTML tables or images.
See Also:
"Customizing Regions" for information about creating specific types of regions
Oracle Database Application Developer's Guide - Fundamentals for information about developing Web applications with PL/SQL
Oracle Database PL/SQL Packages and Types Reference for information about htp packages
As you design your application, you can use buttons to direct users to a specific page or URL, or submit a page. When you submit a page, the Application Express engine posts or process information. A button can be implemented as an HTML button, an image, or by using a template. Buttons can be placed in predefined region template positions or among items in a form.
See Also:
"Creating Buttons"Items are HTML form elements such as text fields, select lists, and check boxes with an associated session state. Item attributes affect the display and behavior of items on a page. For example, these attributes can impact where a label displays, how large an item will be, and whether or not the item will display next to, or below the previous item.
There are two categories 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. Application items are not associated with a page and therefore have no user interface properties. An application item can be used as a global variable.
See Also:
"Creating Items"Computations are units of logic used to assign session state to items. You can use computations to assign a value to an identified item when a page is submitted or displayed.
Processes are logic controls used to execute data manipulation language (DML) or PL/SQL. For example, you can use a process to populate session state at the time a page is rendered, to execute some type of logic (for example, using PL/SQL), or to make a call to the rendering engine. Typically a process performs an action. A process may be hand coded PL/SQL, or the invocation of a predefined process.
Use the Page Processing section of the Page Definition to specify application logic such as computations, validations, processes, and branches. In general, the Application Express engine runs this logic in the order it appears on the Page Definition.

Topics in this section include:
See Also:
"About the Page Definition", "Accessing a Summary View of Controls, Components, and Application Logic", and "Copying or Creating a Control or Component"Computations are units of logic used to assign session state to items and are executed at the time the page is processed.
See Also:
"Understanding Page Computations"Validations enable you to create logic controls to verify whether user input is valid. For example, a validation can check whether or not a value has been entered into a mandatory field
See Also:
"Understanding Validations"Processes are logic controls used to execute data manipulation language (DML) or PL/SQL. Processes are executed after the page is submitted.
See Also:
"Understanding Page Processes"Branches enable you to create logic controls that determine how the user navigates through the application.
See Also:
"Understanding Branches"Shared Components section of the Page Definition contains common elements that can display or be applied on any page within an application.

See Also:
"About the Shared Components Page"Topics in this section include:
See Also:
"About the Page Definition", "Accessing a Summary View of Controls, Components, and Application Logic", and "Copying or Creating a Control or Component"Tabs are an effective way to navigate between pages of an application. Application Builder includes two different types of tabs: standard tabs and parent tabs.
An application having only one level of tabs uses a standard tab set. A standard tab set is associated with a specific page. You can use standard tabs to link users to other pages within your application. A parent tab set functions as a container to hold a group of standard tabs. Parent tabs give users another level of navigation as well as context (or sense of place) within the application.
See Also:
"Creating Tabs"A list of values (LOV) is a static or dynamic definition used to display a specific type of page item, such as a radio group, check box, or select list. LOVs can be static (that is, based on a set of predefined display and return values) or dynamic (based on SQL queries that select values from tables). Once created, a LOV can then be referenced by one or more page items.
You define LOVs at the application level by running the LOV Wizard and adding them to the List of Values repository.
See Also:
"Creating Lists of Values"A breadcrumb is a hierarchical list of links that is rendered using a template. For example, you can display breadcrumbs as a list of links or as a breadcrumb path.
See Also:
"Creating Breadcrumbs"A list is a collection of links that is rendered using a template. For each list entry, you specify display text, a target URL, and other attributes that control when and how the list entry displays. You control the display of the list and the appearance of all list entries by linking the list to a template.
See Also:
"Creating Lists"A theme is a named collection of templates that defines the application user interface. Each theme contains templates for every type of application component and page control, including individual pages, regions, reports, lists, labels, menus, buttons, and list of values.
See Also:
"Managing Themes"Templates control the look and feel of the pages in your application. As you create your application, you specify templates for pages, regions, reports, lists, labels, menus, buttons, and popup list of values. Groups of templates are organized into named collections called themes.
See Also:
"Customizing Templates"You can provide security for your application by specifying an authorization scheme. Authorization is a broad term for controlling access to resources based on user privileges.
Use a navigation bar to link users to various pages within an application. Typically a navigation bar is used to enable users to log in and log out or link to Help text. The location of a navigation bar depends upon the associated page template. A navigation bar icon enables you to display a link from an image or text. When you create a navigation bar icon you can specify an image name, text, a display sequence, and a target location (a URL or page).
See Also:
"Creating a Navigation Bar Entry"Use page computations to assign a value to an identified item when a page is submitted or displayed. You can also use application-level computations to assign values to items. Most application-level computations are performed for every page in an application. In contrast, computations created at the page-level only execute when that page is rendered or processed.
See Also:
"Understanding Application Computations"Topics in this section include:
You create a page computation by running the Create Page Computation Wizard. For each computation, specify the item for which you are creating the computation as well as a computation type.
See Also:
"Computations"To create a page computation:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Computations, click the Create icon.
For Item Location, select the where the computation will execute and click Next. Location options include:
Item on this Page
Item on Another Page
Application Level Item
For Item, select the item and computation point at which you would like to perform the computation:
Compute Item - Select the item the computation will update.
Sequence - Select the order of evaluation.
Computation Point - Select the point at which the computation executes. The computation point On New Instance executes the computation when a new session (or instance) is generated.
Computation Type - Select the method of computation you want to create.
Click Next.
In Computation, enter a computation which corresponds to the selected computation type and click Next.
On Condition, you can choose to make the computation conditional. To make a computation conditional, make selection from the Condition Type list and enter text in the expression fields.
Click Create.
A good example of using computations can be illustrated by a page containing form fields for entering phone numbers. In this example, the phone number is stored in one database column, however the data entry form breaks the phone number into three components: area code, prefix, and line number. In this example, the page items are called P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER.
Next, suppose you need to combine the values stored in these items into a single string. You could accomplish this by using an After Submit computation and store the combined values in an item called P10_PHONE_NUMBER.
To create a computation to store the combined values of P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER in new items:
Navigate to the appropriate Page Definition:
Create a new item named P10_PHONE_NUMBER to store the combined values of P10_AREA_CODE, P10_PREFIX, and P10_LINE_NUMBER. See "Creating a Page-Level Item".
Under Computations, click the Create icon.
For Location, select Item on this Page and click Next.
For Compute Item, select P10_PHONE_NUMBER.
For Sequence, select the order of evaluation.
For Computation, you have the option of creating one of the following computation types:
Static Assignment:
For Computation Type, select Static Assignment and click Next.
Enter the following computation:
(&P10_AREA_CODE.) &P10_PREFIX.-&P10_LINE_NUMBER.
Click Next.
PL/SQL Function Body:
For Computation Type, select PL/SQL Function Body and click Next.
Enter the following computation:
DECLARE
l_return_value VARCHAR2(300) DEFAULT NULL;
BEGIN
l_return_value :=
'('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER;
RETURN l_return_value;
END;
Click Next.
SQL Query:
For Computation Type, select SQL Query and click Next.
Enter the following computation:
SELECT '('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER FROM DUAL
Click Next.
PLSQL Expression:
For Computation Type, select PLSQL Expression and click Next.
Enter the following computation:
'('||:P10_AREA_CODE||')'||:P10_PREFIX||'-'||:P10_LINE_NUMBER
Click Next.
Click Create.
Once you create a computation, you can edit it on the Edit Page Computation page.
To edit a page computation:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Computations, select the computation name.
Edit Page Computation page appears.
Click Apply Changes.
You control when a computation executes under the Computation Point attributes by specifying a sequence and a computation point. The computation point On New Instance executes the computation when a new session (or instance) is generated.
Under Source, enter an expression or query to compute an item's value. In the event a computation fails, you can optionally define an error message in the Computation Error Message field.
You can define a validation declaratively by selecting a validation method. You enter the actual validation edit check in the Validation Messages field. Be aware that if a validation fails, subsequent page processes or computations will not occur. Also remember that the validation you enter must be consistent with the validation type you selected. For more information about validation types, see online Help.
Topics in this section include:
To create a new validation:
Note:
Text entered for validations may not exceed 3,950 characters.Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Validations, click the Create icon.
Select a validation level. Item level validations are specific to a single item. Page level validations do not apply to any single item, but apply to an entire page.
If you selected Item level validation, select the item to be validated and click Next.
Select a validation method as described in Table 4-10.
Table 4-10 Validation Methods
| Validation Method | Descriptions |
|---|---|
|
SQL |
Compares item values to data in the database. For example, you can use a SQL validation to verify whether a last name typed into a field exists in the database. In the following Exists SQL validation, the field is named SELECT 1 FROM customers WHERE last_name = :P1_LAST_NAME |
|
PL/SQL |
Useful if you need complex logic to validate entered data. For example, suppose you need to create a validation for an address form that requires the user enter a province if the address is not in the United States. You could create the validation as a Function Returning Boolean, using the following PL/SQL: BEGIN
IF :P1_COUNTRY = 'US' AND :P1_PROVINCE IS NULL THEN
RETURN FALSE;
ELSE
RETURN TRUE;
END IF;
END;
You could also create the same validation implemented as a PL/SQL Expression as follows: NOT (:P1_COUNTRY='US' AND :P1_PROVINCE IS NULL); |
|
Item Level Null |
Checks if an item's value in session state is null. For example, you could validate that the user enters a value in a field by creating an item validation and then selecting the validation method Item Not Null. |
|
Item String Comparison |
Compares the value of an item to a specific string. There are several string comparison validations that compare the value of an item to a literal string. For example, you select the validation type Item in Expression 1 is contained in Expression 2 to validate a user entry in a field against a list of values you provide. In Expression 1, enter the name of item you want to validate without a colon. For example: P1_VALUE In Expression 2, enter a string a values you want to validate against. For example: ABC/DEF/GHI |
|
Regular Expression |
Regular expressions provide a method to describe text patterns. Use a Regular Expression validation to perform data validation. For example, you could use the following regular expression validation to verify that a string of entered data always consists of groups of six numbers separated by commas and followed by a comma: ^([[:digit:]]{6},)+$
This regular expression would find the following entries valid:
However, the following would not be valid:
|
For SQL, PL/SQL, and Item String Comparison validations, select the type of validation you want to create and click Next.
Specify the sequence and validation name and click Next.
Depending upon the validation method, enter the validation or message text that displays if the validation fails. Click Next.
Define conditions that apply to this validation and click Create.
See Also:
"Validating User Input in Forms"You can choose to have validation error messages display inline (that is, on the page where the validation is performed) or on a separate error page.
To define how a validation error message displays:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Validations, select the appropriate validation.
The attributes page for the validation appears.
Scroll down to Error Message.
In Error Message, enter your error message text.
From Error message display location, select a display location.
This attribute identifies where a validation error message displays. Validation error messages can display on an error page or inline within the existing page. Inline error messages can display in a notification area (defined as part of the page template) or within the field label.
To create a hard error that stops all processing (including validations), you must display the error on an error page.
If you select Inline with Field or Inline with Field and in Notification, you need to associate an item with the error message. To associate an item with the error message, select the item from the Associated Item list.
Click Apply Changes.
You can control when and if a validation is performed under Conditions.
To create a condition for an existing validation:
Navigate to the appropriate Page Definition:
Navigate to the Database Home Page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Under Validations, select the appropriate validation.
The attributes page for the validation appears.
Scroll down to Conditions.
To have a validation performed when a user clicks a particular button, make a selection from the When Button Pressed list.
Make a section from the Condition Type list.
Depending upon the selected Condition Type, enter values in the Expression attributes. The validation will be rendered or processed if the specified condition is met.
Click Apply Changes.
A page process performs an action at a specified point during the rendering or submission of the page. For example, you can create a page process to execute logic or to make a call to the Application Express engine. A page process is a unit of logic that runs when a specific event occurs, such as loading or submitting a page.
From a functional perspective,