Oracle® HTML DB User's Guide Release 1.6 Part Number B14303-02 |
|
|
View PDF |
This section provides important background information about how to use Application Builder. You use Application Builder to build dynamically rendered applications in Oracle HTML DB. An application is a collection of database-driven Web pages linked together using tabs, buttons, or hypertext links.
This section contains the following topics:
See Also:
An application is a collection of pages that share a common session state definition and authentication method. Application Builder is the tool you use to build the pages that comprise an application. You access Application Builder from the Workspace home page. (See Figure 7-1.)
To access Application Builder:
Log in to Oracle HTML DB.
The Workspace home page appears.
To access Application Builder, you can either:
Select an application name from the Applications list
Create a new application by clicking Create Application
The Application Builder home page appears.
As shown in Figure 7-2, the top of the Application Builder home page displays the current application name and application ID, last update date, and parsing schema.
Click the one of the following to run the current application, edit application attributes, create shared components, export and import information, or create a new page:
Run submits the pages in the current application to the HTML DB engine to render viewable HTML
Edit Attributes displays the Edit Application Attributes page
Shared Components links to a new page for building shared application components and user interface controls
See Also:
As shown in Figure 7-3, the Pages list displays at the bottom of the page. To access a specific page, select the page name. To search for a specific page number, enter a page number in the Find field and click Find. To view all pages in an application, leave the Find field blank and click Find.
A Tasks list displays on the right side of the page. It contains the following links:
Delete this Application enables you to delete 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 Page".)
View Application Reports displays links to summary application reports. (See "Viewing Application Reports".)
Application attributes apply to an entire application. Once you create an application the next step is to specify application attributes.
See Also:
"Creating an Application"To edit application attributes:
Navigate to the Workspace home page.
From the Applications list, select an application.
Application Builder appears.
Click the Edit Attributes icon. (See Figure 7-4.)
Edit Application Attributes page appears. Oracle HTML DB creates a unique application ID when you create a new application. The application ID displays at the top of the page. Beneath the application ID are links to various sections of the page. Required values are marked with a red asterisk (*).
The topics that follow describe the specific sections of the Edit Application Attributes page, including:
Use Application Definition attributes to define basic characteristics of your application, including the application name, an optional alphanumeric alias, a version number, and the application owner. Table 7-1 describes all Application Definition attributes.
Table 7-1 Application Definition Attributes
Attribute | Description |
---|---|
Name | Provides a short descriptive name for the application to distinguish it from other applications in the Oracle HTML DB development environment. |
Application Alias | 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 myapp for application 105. Using f?p syntax, you could call application 105 as either:
|
Version | 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 Oracle HTML DB replaces this format mask with the date of last modification of any application attribute. |
Image Prefix | Determines the virtual path the Web server uses to point to the images directory distributed with Oracle HTML DB. During installation, the virtual path is configured as /i/ .
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", "Uploading Images", and "Referencing Images" |
Proxy Server | Use this field to specify a proxy server.
For example, Application Builder 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 Oracle HTML DB, 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 |
Logging | Determines whether user activity is recorded in the Oracle HTML DB activity log. When set to Yes, every page view will be logged, allowing a Workspace administrator to monitor user activity for each application.
Disabling logging may be advisable for high volume applications. |
Parsing Schema | Specifies the schema that all SQL and PL/SQL in the application will be parsed as. You may use #OWNER# to reference this value in SQL queries and PL/SQL (for example, in a region or a process). |
Exact Substitutions | Select whether or not only exact substitutions will be supported. For optimal runtime performance, it is recommended you use exact substitutions.
Exact substitutions use the following sytnax: &ITEM. Non-exact substitutions use the following sytnax: &ITEM |
See Also:
"Using f?p Syntax to Link Pages" for more information on linking pages
Use Authorization to specify an authorization scheme for your application. You may assign only one authorization to an entire application. However, you may 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 tab). 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.
See Also:
"Creating an Authentication Scheme"Use Session Management when establishing your authentication and session management infrastructure. Table 7-2 describes all session management attributes.
Table 7-2 Session Management Attributes
Attribute | Description |
---|---|
Home Link | This is the relative URL used to display the home page of your application. For example, f?p=6000:600 could be for application 6000 with a home page number of 600.
The value you enter here replaces You can also use this attribute to specify a custom procedure to function as a home link. For example, you could create a custom procedure named |
Login URL | Specifies the location of the application login page.
See Also: "Using Substitution Strings" and "Creating an Authentication Scheme" |
Public User | Identifies the Oracle schema (that is, the user) used to connect to the database when generating unprotected pages.
When a user logs in as this user, the HTML DB engine considers this to be a "public user" session. The HTML DB engine supports the following built -in display conditions:
If the current application user (or For example you can show a login button if the user is a public user and a logout link if the user is not the public user. The public user (if null) defaults to " See Also: "Establishing User Identity Through Authentication" |
To view details about a selected authentication scheme, click mange next to Authentication: SCHEME.
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"Use Globalization attributes to specify globalization options such as the primary application language. Table 7-3 describes theses attributes.
Table 7-3 Globalization Attributes
Use these 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 who have access and can run the application. Table 7-4 describes these attributes.
Table 7-4 Application Availability Attributes
See Also:
"Managing Application Build Status"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 your page template contains a #GLOBAL_NOTIFICATION#
substitution string, then the text entered here displays on each page.
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"VPD provides an application programmatic interface (API) which 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.
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 name. If you identify an image in the Image attribute and include the #LOGO#
substitution string in your page template, the HTML DB engine generates an image tag. Use Logo Image Attributes to identify specific image attributes for the logo image. For example:
width="100" height="20" alt="Company Logo"
Use Build Options to enable or disable functionality. Most application attributes have a build option attribute. Do not specify a build option unless you plan on excluding that object from specific installations. Build Options have two possible values: INCLUDE
and EXCLUDE
. If you specify an attribute as being included then the HTML DB engine considers it at runtime. However, if you specify an attribute as being excluded then the HTML DB engine treats it as if it does not exist.
Application 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 7-5 describes Application Template Defaults for the current application.
Table 7-5 Application Template Defaults Attributes
Attribute | Description |
---|---|
Default Page Template | Indicates the default page template for displaying 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" |
Print Mode Page Template | Identifies the template to be used when the HTML DB engine is in printer friendly mode.
When calling the HTML DB engine to render a page, you have the option of specifying whether or not the page should be displayed in a printer friendly mode. If you specify YES, then the page displays using a printer friendly template. The HTML DB 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" |
Error Page Template | Optional. Specifies a page template to use for errors that display on a separate page as opposed to those that display inline. |
Wizard Template Defaults identify default templates Application Builder uses when running wizards. You can override these settings on the attributes page for each control or component. Table 7-6 describes Wizard Template Defaults for the current application.
Table 7-6 Wizard Template Defaults Attributes
Attribute | Description |
---|---|
Calendar | Default calendar template used when creating a new calendar. |
Label | Default label template used when you create new page items. |
Report | Default report template used when you create new report. |
List | Default template used when you create a list. |
Menu | Default template used when you create a menu. |
Button | Default template to be used when you create new buttons that are template controlled. |
Region | Default region template used when you create a new region. |
Chart Region | Default region template used when you create a chart. |
Form Region | Default region template used when you create a form. |
Report Region | Default region template used when you create a report. |
Tabular Form Region | Default region template used when you create a tabular form. |
Wizard Region | Default region template used when you create a new wizard component |
Menu Region | Default region template used when you create a new menu. |
List Region | Default region template used when you create a new list. |
A page is the basic building block of an Oracle HTML DB 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.
Topics in this section include:
You can view, create, and edit the controls and components that define a page by accessing the Page Definition.
To view the Page Definition for an existing page:
Navigate to the Workspace home page.
From the Applications list, select an application.
Application Builder appears. The list of pages in the current application appears at the bottom of the page.
From the Pages list, select a page.
As shown in Figure 7-5, the Page Definition appears.
As shown in Figure 7-6, a breadcrumb menu displays at the top of each Page Definition. Breadcrumb menus appear on every page in Oracle HTML DB. Each menu entry indicates your location relative to other pages in the current application and functions as a navigation path. You can instantly link to another page by clicking a breadcrumb menu entry.
The current page number displays on the far right side of the page, next to a small button that resembles a traffic light. Clicking this button to runs the current page and renders it into viewable HTML.
A page navigation bar appears next. (See Figure 7-6.) Options available on the page navigation bar include:
Page. This field displays the current page number. To access another page directly, enter a page number and click Go. To access the previous or next page number, click the arrow buttons.
Copy. Creates a copy of the selected page within the current application.
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 authorization schemes.
The page name and last update date appear next.
The center of every Page Definition is divided into three sections as described in Table 7-7.
Table 7-7 Divisions of the Page Definition
Section | Description |
---|---|
Page Rendering | Defines all attributes for the page, regions, buttons, items, page rendering computations and page level processes.
See Also: "Understanding Page Rendering Controls" |
Page Processing | Specifies page level application logic such as computations, validations, processes, and branching.
See Also: "Understanding Page Processing Controls" |
Shared Components | Displays application components that can be shared among multiple pages.
See Also: "Working with Shared Components", "Creating Tabs", "Creating Lists of Values", "Creating Menus", "Creating Lists", "Customizing Templates", "Understanding Security", and "Creating a Navigation Bar" |
Each Page Definition contains the following row of buttons at the top of the page:
Event View links to a report that details currently defined page controls and processes
Object References displays a list of database objects referenced by the current page
Export enables you to export the current page
History displays a history of recently changed pages
See Also:
"Viewing a Page"Clicking Event View displays the Page Application View report. This report details all currently defined page controls and processes. It provides a chronological view of how and in what order the HTML DB engine renders the page, invokes logic, and runs processes. You can control the amount of information that displays by selecting one of the following view options:
Show All displays all possible page controls and processes, including those not currently defined
Show Used displays currently used page controls and processes (Default)
To view details about a specific page control or process, click the appropriate hypertext link. Alternately, you can create new page controls and processes by clicking the small icons to the left of each entry.
To run the current page, click Run. To create a new page, click Create.
Clicking Object References displays a list of database objects referenced by the current page. Click the Referenced Name to view object details. Click the application number to view all database objects referenced by the current application.
Click Export to export the current page. Remember that some pages may reference shared components. To export all pages within an application, you need to complete an application export.
Users who log in to Oracle HTML DB having developer privileges have access to the Developer toolbar. The Developer toolbar offers a quick way to edit the currently selected page, create a new page, control, or component, view session state, or turn edit links on an off.
The Developer toolbar (see Figure 7-7) displays at the bottom of every page in a running application.
The Developer toolbar consists of the following links:
Edit Application links you to the Application Builder home page. (See "About the Application Builder Home Page".)
Edit Page accesses the Page Definition for the currently running page. (See "Editing a Page Definition".)
New links to a wizard for creating a new blank page, component (report, chart, or form), page control (region, button, or item), or a shared component (menu, list, or tab). (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 runs the current page in 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 number, a name, and typically some text attributes such as a header, title and footer. You add content to your page by creating page controls (regions, items, and buttons). Page templates and page region templates control the exact look and feel of each page.
Topics in this section include:
See Also:
"Understanding the Page Definition"You can view, create, and edit the controls and components that define a page by accessing the Page Definition.
To view the Page Definition for an existing page:
Navigate to the Workspace home page.
From the Applications list, select an application.
Application Builder appears. The list of pages for the selected application appears at the bottom of the page.
From the Pages list, select a page name.
The Page Definition appears.
Each Page Definition serves a a central navigation point for all the controls, components, and application logic that defines 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. 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, if your Page Definition contained a region named Customers, clicking the region name displays an attribute page for that region.
You can copy or create new controls or components by clicking the Copy and Create icons. (See Figure 7-8.) The Copy icon resembles two small overlapping pages. The Create icon consists of a plus (+) sign overlapping a small page. Click the Copy icon to make a copy of the current control or component. Click the Create icon to create a new 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. (See "Viewing a Page Definition".)
From the navigation bar 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, including:
See Also:
"Adding Additional Pages" for more information on 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 7-9 describes these attributes.
Table 7-8 Page Identification Attributes
Attributes | Descriptions |
---|---|
Name | Identifies the name of the current page for application developers. This name is used in numerous Oracle HTML DB pages and reports, along with the page number and page title. |
Page Alias | Enter an alphanumeric alias for this page. This alias must be unique within the current application.
For example, if you were working on page 1 of application 100, you could create an alias called f?p=100:home |
Group | Identify the page group you would like to associate with this page.
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 7-9 describes these attributes.
Table 7-9 Primary Display Attributes
Attributes | Descriptions |
---|---|
Page Template | Select a page template to control the appearance of this page. Making a selection here overrides the use of the default page template selected for the application when rendering this page. |
Standard Tab Set | Select a standard tab set to be used for this page. A standard tab set is associated with a specific page and page number. You can use standard tabs to link users to a specific page.
See Also: "Creating Tabs" |
Title | Enter a title to display in the title bar of the browser window. The HTML DB engine uses the title you specify here in place of the #TITLE# substitution string used in the page template. This title is inserted between the HTML tag <TITLE></TITLE> . |
Cursor Focus | Select whether 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 this attributes 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 these attributes to define page header, body header, body footer, and page footer text. Table 7-10 describes these attributes.
Table 7-10 Page Header, Footer and Text Attributes
Use this attribute to add onload events 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 for the current page and indicate whether the page requires an authentication method.
From the Authorization Scheme list, 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. A given 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.
From the Authentication list, specify 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 may 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 whether this attribute has any effect.
See Also:
"Understanding Security"Use the Allow duplicate page submissions list to specify whether Oracle HTML DB enables users to 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 unless you plan on excluding that object from specific installations.
Build options have two possible values: INCLUDE
and EXCLUDE
. If you specify an attribute as being included, then the HTML DB engine considers it part of the application definition at runtime. Conversely, if you specify an attribute as being excluded, then the HTML DB engine treats it as if it does not exist
Use this attribute to specify the error text that displays in the #NOTIFICATION_MESSAGE#
substitution string in the event of an error occurring on the page.
See Also:
"Page Templates"Use this attribute to enter help text for the current page. Page level help supports shortcuts using the following syntax:
"SHORTCUT_NAME"
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:&SESSION::&DEBUG::LAST_STEP:&APP_PAGE_ID
See Also:
"Creating a Help Page"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:
A region is a section of a page that serves as a container for content within a page. 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.
See Also:
"Customizing Regions" for more information on creating specific types of regions
Oracle Database Application Developer's Guide - Fundamentals for more information on developing Web applications with PL/SQL
PL/SQL Packages and Types Reference for more information on htp packages
As you design your application you can use buttons to direct users to a specific page or URL, or to post or process information. Buttons can be placed in predefined region template positions or among items in a form.
See Also:
"Creating Buttons"An item can be a text field, text area, password, combobox, check box, and so on. Item attributes affect the display and behavior of items on a page. For example, these attributes can impact where a label displays, how large an item will be, and whether the item will display next to, or below, the previous item.
There are two 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. 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"You can use 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:
"Creating a Page Computation"You create a page process to execute some logic (for example, using PL/SQL), or to make a call to the rendering engine. Typically a process performs an action. For example, a process may be hand coded PL/SQL, or the invocation of a predefined process available within Oracle HTML DB.
A page process is a unit of logic that runs when a specific event occurs, such as loading or submitting page. From a functional perspective, there is no difference between page level and application level processes. The difference lies in the point at which the process occurs.
See Also:
"Creating a Page Process"Use the Page Processing section of the Page Definition to specify application logic such as computations, validations, processes, and branching. In general, the HTML DB engine runs this logic in the order it appears on the Page Definition.
You can define a validation declaratively by selecting a built-in validation type or by entering custom SQL or PL/SQL. You enter the actual validation edit check in the Validation Messages field. Be aware that if a validation fails, subsequent page processing does not occur. Also remember that the validation you enter must be consistent with validation type you selected. For more information on validation types, see online help.
See Also:
"Validating User Input in Forms"To create a new validation:
Navigate to the appropriate Page Definition. (See "Viewing a Page Definition".)
Under Validations, click the Create icon.
When the Create Validations Wizard appears, follow the on-screen instructions.
Validations Types are divided into two categories:
Item. These validations start with the phrase "Item" and provide common checks you may want to perform on the item that the validation is associated with.
Code. These validations require you provide either PL/SQL code or a SQL query that defines the validation logic. Use this type of validation to perform custom validations that require verifying values of more than one item or accessing additional database tables.
Follow the on-screen instructions.
Note:
Validations may not contain more than 3,950 characters.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. (See "Viewing a Page".)
Under Validations, select the appropriate validation.
The attributes page for the validation appears.
Scroll down to Error Messaging.
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 processing of any remaining 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 Conditional Validation Processing. To have a validation performed when a user clicks a button, make a selection from the When Button Pressed list.
You can add other conditions by making a selection from the Condition Type list and entering text in the expression fields.
A branch is an instruction to go to a specific page, procedure, or URL. For example you can branch from page 1 to page 2 after page 1 is submitted.
You create a new branch by running the Create Page Branch Wizard and specifying Branch Point and Branch Type. The Branch Type defines the type of branch you are creating. For more information on Branch Types, see online help.
You specify when a branch executes by making a selection from the Branch Point list. Valid options include:
On Submit: Before Computation - Occurs before computations, validations, or processing. Use this option for buttons that do not need to invoke any processing, for example, a Cancel button.
On Submit: Before Validation - Occurs after computations, but before validations or processing. If a validation fails, page processing stops, a rollback is issued, and the page displays the error. Because of this default behavior, you do not need to create branches to accommodate validations. However, you may want to branch based on the result of a computation (for example, to a previous branch point).
On Submit: Before Processing - Occurs after computations and validations, but before processing. Use this option to branch based on a validated session state, but before performing any page processing.
On Submit: After Processing - Occurs after computations, validations, and processing. This option branches to a URL or page after performing computations, validations, and processing. When using this option, remember to sequence your branches if you have multiple branches for a given branch point.
On Load: Before Header - Occurs before a page is rendered. This option displays another page instead of the current page or redirects the user to another URL or procedure.
Depending upon the Branch Type you select, you can specify the following additional information in Branch Action attributes:
The page number of the page you wish to branch to
PL/SQL procedure which ultimately renders a branch target page
A URL address
Like other controls, branches can be made conditional. To create a conditional branch, make a selection from the Condition Type list and enter text in the expression fields to implement the condition type you choose.
See Also:
"Controlling Flow Using Branches"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:
"Page Computations"To create a page computation:
Navigate to the appropriate Page Definition. (See "Viewing a Page Definition".)
Under Computations, click the Create icon.
Select a category.
Follow the on-screen instructions.
You can edit how a computation works on the Edit Page Computation page. To access the Edit Page Computation page, navigate to the Page Definition and select the computation name.
You control when a computation executes under Firing Points attributes by specifying a sequence number and a computation point. The computation point On New Instance
executes the computation when a new session (or instance) is generated.
Under Computation 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 Computation Error Message field.
You create a process by running the Create Process Wizard. During the wizard, you define a process name, specify a sequence, the point at which process will execute, and select a process category. You can change nearly all of these attributes on the Edit Page Process page.
See Also:
"Page Processes"Navigate to the appropriate Page Definition. (See "Viewing a Page Definition".)
Under Processes, click the Create icon.
Select a category. Table 7-11 describes available page process categories.
Table 7-11 Process Categories
Process Category | Description |
---|---|
Data Manipulation | Oracle HTML DB supports the following declarative data manipulation processes:
|
Form Pagination | Implements pagination through the detail records associated with a master detail form. This process check the master table to determine which set of detail records you are in and determines what the next detail record should be.
See Also: "Building a Master Detail Form" |
On Demand | Creates an application level process that can only be executed when called from a specific page. When you create this process type at the page level, it creates a procedure that calls a previously defined On Demand procedure from the application level. |
PL/SQL | Runs the PL/SQL you provide. Use this process type to execute a block of PL/SQL entered directly into the process or to simply call an existing API. |
Report Pagination | Resets pagination back to the first result set. The HTML DB engine keeps track of where the user is within a given result set. This process category returns the user to the beginning result set. In other words, this category resets the counters associated with the report region to return the first part of the result set the next time the result set displays. |
Session State | Sets the values of existing session state items to null. Select this process type to clear the cache for applications, sessions, or items as well as to clear existing user preferences.
See Also: "Managing Session State Values" and "Managing User Preferences" |
Web Services | Implements a Web Service as a process on a page. Running the process submits a request to the service provider.
See Also: "Invoking a Web Service as a Process" |
Follow the on-screen instructions.
Once you create a process you can control when the process executes and what the process does by editing attributes on the Edit Page Process page.
To edit an existing page process:
Navigate to the appropriate Page Definition. (See "Viewing a Page Definition".)
Select the process name.
The Edit Page Process page appears.
You control when a process executes by specifying a sequence number and a process point under Process Firing Point. You can prevent a process from running during subsequent visits to a page by selecting one of the following options under Run Process:
Once for each page visit
Once for each session or when reset
Enter the appropriate code for PL/SQL process types. For PL/SQL anonymous block processes, enter the appropriate code under Process. For Clear Cache processes, enter the appropriate code under Source. In the event a process fails, you can optionally define an error message in the Process Error Message field.
You can make a process conditional by selecting a condition type and entering an expression under Conditional Processing.
Additionally, you can also make a selection from the When Button Pressed attribute. When you select a button from this list, the process only executes if a user clicks the selected button.
You can use the tools and wizards on the Shared Components page either at the application level, or on specific pages. Examples of shared components include logic controls (build options, computations, processes), shared navigation and user interface elements (menus, lists, tabs, lists of values, templates) and authentication and authorization schemes.
To access the Shared Components page:
Navigate to the Workspace home page.
From the Applications list, select an application.
On the Application Builder home page, click Shared Components.
The Shared Components page appears. Shared components are grouped into the following categories:
To create a shared component, select the appropriate link and follow the on-screen instructions.
Logic contains links to tools for creating and managing application level logic controls such as build options, computations, items, processes, and Web services. Table 7-12 describes the options available under Logic.
Table 7-12 Shared Components - Logic
Shared Component | Description |
---|---|
Build Options | Use build options to conditionally display or process specific functionality within an application. You can use build options to control which features of an application are turned on for each application deployment. If you specify a build option at the application level, you do not need to specify it for each component (for example, for each page, branch, button, item, or tab). |
Computations | Use application level computations to assign values to application and page level items for each page displayed or for a new page instance.
You can also create an application level computation and execute it conditionally on multiple pages. |
Items | Application level items do not display, but are used as global variables to the application. You set the value of a page level item using an application or page computations. Use the ON_NEW_INSTANCE computation to set a value.
See Also: "Creating Items" |
Processes | Use application processes to run PL/SQL logic:
Note that On Demand processes executes only when called from specific pages. |
Web Services | Web services in Oracle HTML DB are based on SOAP (the Simple Object Access Protocol). You can create a reference to a Web service and then incorporate it into an application to process data submitted by a form, or to render output in the form.
See Also: "Implementing Web Services" |
Contains links to tools for creating and managing lists, menus, navigation bars, tabs, and trees. Table 7-13 describes the available options under Navigation.
Table 7-13 Shared Components - Navigation
Shared Component | Description |
---|---|
Lists | A list is a shared collection of links. You control the appearance of a list through list templates. Each list element has a display condition which enables you to control when it displays.
See Also: "Creating Lists" |
Menus | A menu is a hierarchical list of links that displays using templates. You can display menus as a list of links, or as a breadcrumb path.
See Also: "Creating Menus" |
Navigation Bar | Navigation bars offer users a simple navigation path for moving between pages in an application. The location of a navigation bar depends upon the associated page template. A navigation bar icons can display as a link from an image or text. A navigation bar entry can be an image, an image with text beneath it, or text.
See Also: "Creating a Navigation Bar" |
Tabs | Tabs are an effective way to navigate users between pages in an application. You can create two types of tabs: standard tabs or parent tabs. A standard tab set is associated with a specific page and page number. A parent tab set functions as a container to hold a group of standard tabs.
See Also: "Creating Tabs" |
Trees | A tree is an effective way to communicate hierarchical or multiple level data.
See Also: "Creating Trees" |
Contains links to the Authentication and Authorization pages. You provide security for your application through authentication and authorization. Authentication is the process of establishing users' identities before they can access an application. Authorization controls user access to specific controls or components based on predefined user privileges.
See Also:
"Understanding Security"Contains links to tools for creating and managing lists of values, shortcuts, and templates. Table 7-14 describes the available options under User Interface.
Table 7-14 Shared Components - User Interface
Shared Component | Description |
---|---|
Lists of Values | A list of values (LOV) is a static or dynamic definition used to display a popup list of values, select list, check box, or radio group.
See Also: "Creating Lists of Values" |
Shortcuts | When you create a shortcut, you define frequently used HTML in a central repository so you can later references it in various locations within your application.
See Also: "Utilizing Shortcuts" |
Themes and Templates | Templates control the look and feel of the page in your application.
See Also: "About Themes and Templates" and "Customizing Templates" |
Contains links to the tools for translating applications developed in Oracle HTML DB. You can develop applications in Oracle HTML DB that can run concurrently in different languages. A single Oracle database and Oracle HTML DB instance can support multiple database sessions customized to support different languages. Table 7-15 describes the available options under Translations.
Table 7-15 Shared Components - Translations
The HTML DB engine constructs the appearance of an application using themes. A theme is a named collection of templates that defines the application user interface.
Each theme contains templates for every type of application component and page control, including individual pages, regions, reports, lists, labels, menus, buttons, and list of values. Templates contain HTML and variables that the HTML DB engine substitutes with dynamic values at runtime. The primary advantage of themes is that you can manage the appearance of components and controls in one central location.
The HTML DB engine creates the user interface of an application based on a named collection of templates called a theme. Each templates contains HTML and variables that the HTML DB engine substitutes at runtime with dynamic values. By using themes, you can manage the appearance of your application user interface in one central location.
You can also override the default page level template on a page by page basis. An application can have any number of page templates. If you do not specify a template, the HTML DB engine uses the default template specified in the current theme.
Application Builder includes a number of reports to help you better manage your application.
To access application reports:
Navigate to the Workspace home page.
Select an application name from the Applications list.
From the Tasks list, select View Application Reports.
Application Reports page appears. Reports are categorized as follows:
Shared Component Reports
Page Component Reports
Activity Reports
Select a report to review.
See Also:
"Viewing Application and Schema Reports" for information on other reports that are available to all developersThe Database Object Dependencies report identifies database objects referenced by the current application.
To view the Database Object Dependencies report:
Navigate to the Workspace home page.
Select an application name from the Applications list.
From the Tasks list, select View Application Reports.
Application Reports page appears.
Under Shared Component Reports, select Database Object Dependencies.
To view the components that reference a specific database object, select the Reference Count number.
Use the Region Source report to search through all region source in your application.
To view the Region Source report:
Navigate to the Workspace home page.
Select an application name from the Applications list.
From the Tasks list, select View Application Reports.
Application Reports page appears.
Page Component Reports, select Region Source.
To view the components that reference a specific database object, select the Reference Count number.