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

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

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

10 Managing Themes and Templates

This section describes different ways you can alter your application's user interface and page layout through themes and templates.

This section contains the following topics:

See Also:

"Adding Navigation" and "Using the Drag and Drop Layout Page"

Managing Themes

Themes are collections of templates that can be used to define the layout and style of an entire application. The idea behind a theme is to provide a complete set of templates that accommodate every UI pattern that may be needed in an application. Templates are organized first by type (breadcrumb, button, calendar, label, list, page, popup list of values, region, and report) and then by template classes, identifying the purpose of the each template within that type. Each template type provides a group of standard classes and eight custom classes. These classifications enable Oracle Application Express to map templates among themes, making it easy to quickly change the entire look and feel of an application.

Oracle Application Express ships with an extensive theme repository. You can add themes to the theme repository as follows:

Topics in this section include:

Accessing the Themes Page

You manage themes on the Themes page. You can access the Themes page from the Shared Components page or from the Page Definition.

Topics in this section include:

Accessing the Themes Page from Shared Components

To access the Themes page from Shared Components:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Themes.

    The Themes page appears.

  5. Select Details from the View list and click Go.

    A check mark in the Current column indicates which theme is selected.

  6. Click the theme name.

    The Create/Edit Theme page appears.

Accessing the Themes Page from a Page Definition

To access the Themes page from the Page Definition:

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

  2. Select an application.

  3. Select a page.

    The Page Definition appears.

  4. Under Shared Components, locate the Theme section.

  5. Click a theme name.

    The Create/Edit Theme page appears.

Changing the Default Templates in a Theme

A standard theme contains templates for every type of application component and region type. You can change the selected default templates for a theme on the Create/Edit Theme page.

You can override the default templates in a theme by selecting another template when you create components or regions, or by changing the template on the component or region attributes page.

To review or change the default templates in a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

      The Themes page appears.

  2. To edit a theme:

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

    2. Click the theme name.

    The Create/Edit Theme page appears.

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

    Note the application ID and the Theme Identification Number display at the top of the page.

  3. To change the theme name, enter a name in the Name field.

  4. To change a default template, make a selection from the appropriate list.

    Table 10-1 describes the default templates available under Component Defaults.

    Table 10-1 Component Default Templates

    Attribute Description

    Page

    Identifies the default template for displaying pages. If a developer does not explicitly choose a template, then the Application Express engine uses the template specified here.

    Once defined, this default template appears on the Edit Definition page under the heading Application Template Defaults.

    See Also: "Display Attributes" for information about overriding the page template on the Page Attributes page

    Error Page

    Specifies a page template to use for errors that display on a separate page as opposed to those that display inline. Leave this attribute blank if you do not want to use a template designed to display errors.

    Once defined, this default template appears on the Edit Definition page under the heading Application Template Defaults.

    Printer Friendly Page

    Identifies the template to be used when the Application Express engine is in printer friendly mode.

    See Also: "Optimizing a Page for Printing"

    Breadcrumb

    Identifies the default breadcrumb template used when you create a breadcrumb.

    Button

    Identifies the default button template used when you create a button.

    Calendar

    Specifies the default calendar template used when you create a calendar.

    Label

    Identifies the default label template used when you create a label.

    List

    Specifies the default list template used when you create a list.

    Region

    Specifies the default region template used when you create a region.

    Report

    Identifies the default region template used when you create a report.


    Table 10-2 describes the default templates available under the section Regions Defaults.

    Table 10-2 Region Defaults

    Attribute Description

    Breadcrumbs

    Default region template used when you create a breadcrumb.

    Charts

    Default chart template used when you create a chart.

    Forms

    Default form template used when you create a form.

    Lists

    Default region template used when you create a list.

    Reports

    Default region template used when you create a report.

    Tabular Forms

    Default region template used when you create a tabular form.

    Wizards

    Default region template used when you create a wizard component.


Creating a Theme

You can create a theme from scratch or select an existing theme from the repository.

To create a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Create.

  3. Select a creation method:

    • From the Repository

    • From Scratch

    • From Export

  4. Follow the on-screen instructions.

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

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

About the Themes Page

Once you create a theme, it appears on the Themes page. A navigation bar appears at the top of the page and contains the following controls:

  • Theme. Enter a case insensitive query for a theme name and click Go. To view all themes, leave the field blank and click Go.

  • View. Controls how the page displays. Options include:

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

    • Details displays each theme as a line in a report. To change the theme name or default templates, click the theme name. In Details view, you can select the following options from the Show list:

      • Summary View displays the theme number, name, and current status.

      • Detailed View displays the theme number, name, current status, and the number of templates in each template type.

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

Editing a Theme

You can create a theme from scratch or select an existing theme from the repository.

To create a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. On the Tasks list, click Edit Theme.

    The Create/Edit Theme page appears.

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

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

  4. Make the appropriate edits and click Apply Changes.

Switching the Active Theme

When you switch to a theme, all components with assigned templates are assigned to a corresponding template in the theme. Application Builder accomplishes template mapping through the assignment of template class identifiers.

Note:

You can only switch to a theme if that theme exists. For example, before you can switch to a theme available in the repository, you must first create it. See "Creating a Theme".

To apply a theme to an application:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Switch Theme.

    The Switch Theme page appears.

  3. From Switch to Theme, select a theme and click Next.

  4. Review the Status column to identify problematic mappings:

    • Check indicates the mapping was successful.

    • Warning indicates there are more than one template in the theme you are switching to with the identified class. The warning provides a select list from which to choose the appropriate template.

    • Error indicates that Application Builder was unable to map the class among the themes. Ensure that a class is identified for the templates in both themes.

  5. Click Next to continue.

  6. Click Switch Theme.

Copying a Theme

Each theme is identified by a numeric identification number (ID). When you copy a theme, you specify a theme ID. Copying a theme is useful when experimenting with editing a theme or to export a theme with a different ID.

To copy a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. On the Tasks list, click Copy Theme.

  3. On Copy Theme:

    1. Copy From Theme - Select the theme you want to copy.

    2. Copy to this Theme Identification Number - Enter a new ID for the theme.

    3. Click Next.

  4. Click Copy Theme ID.

Deleting a Theme

You can only delete inactive themes. When you delete a theme, Application Builder only removes inactive templates.

To delete a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. On the Tasks list, click Delete Theme.

  3. From Remove Theme, select the theme you want to delete and click Next.

  4. Click Delete Theme.

Managing Workspace Themes

Workspace administrators manage the theme repository for a workspace. Workspace administrators can add a theme to the repository, making it available to all developers within a workspace, or delete it.

Topics in this section include:

See Also:

"Managing Themes for an Oracle Application Express Instance" in Oracle Application Express Administration Guide

Adding a Theme to the Theme Repository

To add a theme to the Theme repository:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. From the Tasks List, click Manage Workspace Themes.

  3. Select Create and click Next.

  4. For Application Theme to Copy, select the desired theme and click Next.

  5. for Identify Name, enter a theme number, name, and optional description and then click Next.

  6. Click Create Workspace Theme.

Deleting a Workspace Theme

To delete a workspace theme:

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

  2. On the Tasks list, click Workspace Themes.

  3. Select the theme to be deleted.

  4. Click Delete.

Modifying a Workspace Theme

You cannot edit a workspace theme directly. To modify a workspace theme, you need to create an application using the theme, modify it, and then manually add it to the workspace theme repository. a theme in the same way you export any related application files.

To modify a workspace theme:

  1. Create an application using the theme you want to modify. "Creating an Application".

  2. Modify the theme. See "Editing a Theme".

  3. Delete the existing workspace theme. See "Deleting a Workspace Theme".

  4. Add the modified theme to the workspace theme repository. See "Adding a Theme to the Theme Repository".

About Exporting a Workspace Theme

You export a theme in the same way you export any related application files. Exporting a workspace theme involves the following steps:

  1. Create an application using the theme. "Creating an Application".

  2. Export the application. See "Exporting an Application".

  3. Import the exported file into the target Oracle Application Express instance. See "Importing an Application or Page".

  4. Install the exported file from the Export Repository. See "Installing Export Files".

About Exporting and Importing Themes

You export a theme in the same way you export any related application files. Exporting a theme from one development instance to another involves the following steps:

  1. Create an application using the theme. "Creating an Application".

  2. Export the theme using the Export Theme utility. See "Exporting Themes".

  3. Import the exported file into the target Oracle Application Express instance. See "Importing Export Files".

  4. Install the exported file from the Export Repository. See "Installing Export Files".

Changing a Theme Identification Number

Each theme has an identification number (ID). You can use the Change Theme ID utility to change a theme ID to another identification number. Changing a theme ID is useful when you want to export a theme with a different number and then import it into another application.

To change a theme identification number:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. On the Tasks list, click Change Identification Number.

  3. For Theme Number:

    1. Identify Theme - Select a theme.

    2. Change to this Theme Identification Number - Specify an identification number.

    3. Click Next.

    4. Confirm your changes and click Change Theme ID.

Viewing Theme Reports

Application Builder includes a number of reports designed to help you manage themes and templates.

Topics in this section include:

Viewing All Templates in a Theme

To view all templates that comprise a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Reports.

  3. On the Theme Reports page:

    1. From Report, select Application Templates.

    2. From Theme, select a theme.

    3. Click Go.

    A list of templates appears with the template type, template name, the associated theme, and template class.

  4. To edit a template, select the template name.

Viewing Theme Template Counts

The Theme Template Count report lists which template classes currently have templates created for them.

To view the Theme Template Count report:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Reports.

  3. On the Theme Reports page:

    1. From Report, select Theme Template Counts.

    2. From Theme, select a theme.

    3. Click Go.

  4. If you are using custom classifications, select Show Custom and click Go.

Viewing File References

The File References report displays a list of all files associated with templates, shared components, or page components in the current application.

To view the File References report:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. On the Themes page, click Reports.

  3. On the Theme Reports page:

    1. From Report, select File References.

    2. From Theme, select a theme.

    3. Click Go.

  4. On the File References page:

    1. From Show, select the type of component to include in the report. If you do not make a selection, no results are returned.

    2. From Show Files, select one of the following:

      • With context displays the component, the theme identification number, the component name, the image (if applicable), and the page number. Select the page number to link to a Page Definition.

      • Without context displays only the file name and the image (if applicable).

    3. From File Extensions, select the type of extensions for which to search.

    4. Click Go.

  5. To download a comma-delimited file (.csv) version of this report, click Download at the bottom of the page.

Viewing Class References

Accessing the Class References report displays a list of classes associated with templates, shared components, or page components in the current application.

To view the Class References report:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Reports.

  3. On the Theme Reports page:

    1. From Report, select Class References.

    2. From Theme, select a theme.

    3. Click Go.

  4. On the Class References page:

    1. From Show, select the components to check for a class reference. If you do not make a selection, no results are returned.

    2. From Show Class Names, select one of the following:

      • With context displays the component, the theme identification number, the component name, the image (if applicable), and the page number.

      • Without context displays only the referenced class.

    3. Click Go.

  5. To download a comma-delimited file (.csv) version of this report, click Download at the bottom of the page.

Viewing Template Substitution Strings

Use the Template Substitution Strings report to view all supported substitution strings by component.

To view the Substitution String report:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

  2. Click Reports.

  3. On the Theme Reports page:

    1. From the Report list, select Template Substitution Strings.

    2. From the Theme list, select which themes to include in the report.

    3. Click Go.

  4. To link to a template definition, select the component name.

Customizing Templates

The Application Express engine creates the user interface of an application based on a named collection of templates called a theme. Templates control the look and feel of the components in your application. If you need to create a custom template, it is generally easier to start with an existing template and then modify it. Once you have created one or more default templates, you can modify those templates to fit your specific needs.

Topics in this section include:

See Also:

Managing Themes

About Cascading Style Sheets

A cascading style sheet (CSS) provides a way to control the style of a Web page without changing its structure. When used properly, a CSS separates visual attributes such as color, margins, and fonts from the structure of the HTML document. Oracle Application Express includes themes that contain templates that reference their own CSS. The style rules defined in each CSS for a particular theme also determine the way reports and regions display.

Selecting a Default Page Template

You can specify a default page template in two ways:

  • Select a default page template within a specific theme.

  • Select a specific page template on a page-by-page basis.

By default, the Application Express engine uses the Page template specified on the Themes page.

Topics in this section include:

Selecting a Page-level Template Within a Theme

To specify a default page template within a theme:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Themes.

      The Themes page appears.

  2. From View, select Details and click Go.

  3. In the Themes list, select the theme name.

    The Create/Edit Theme page appears.

  4. Under Component Defaults, make a selection from the Page list.

  5. Click Apply Changes at the top of the page.

Selecting a Page-level Template for a Specific Page

To specify a page-level template for a specific page:

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

  2. Select an application.

  3. Select a page.

  4. Under Page, click the Edit page attributes icon.

  5. Locate the section Display Attributes.

  6. Make a selection from the Page Template list.

  7. Click Apply Changes at the top of the page.

Creating a New Template

If you must create a custom template, it is generally easier to start with an existing template and then modify it. Once you have created one or more default templates, you can modify those templates to fit your specific needs.

To create a custom template:

  1. Navigate to the Templates page.

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Templates.

  2. Click Create.

  3. Select the type of template you want to create.

  4. Select a creation method:

    • From Scratch

    • As a Copy of an Existing Template

  5. Follow the on-screen instructions.

Tip:

Make sure you associate your template with the correct theme.

Viewing Template Reports

Application Builder includes reports describing template utilization, subscription, published templates and edit history.

To view template reports for the current application:

  1. Navigate to the Themes page:

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

    2. Select an application.

    3. Click Shared Components.

    4. Under User Interface, select Templates.

  2. You can narrow the display by making a selection from the following lists and clicking Go.

    • Template Name - Enter a case insensitive query.

    • Theme - View only templates in a specific theme.

    • Referenced - Select a type of template to display.

    • Type - Select a a type of template type.

    • Since - Restrict the report to a specific time frame. Select the amount of time to include in your report.

    • Subscribed - Specify whether to view All Templates, Subscribed Templates, or Not Subscribed Templates.

  3. To view template reports, click the following buttons:

    • Utilization displays template utilization in the current application for all template types (page, report, region, label and list).

    • Subscription displays subscribed templates in your application.

    • History details recent changes to templates by developers and the last update date.

Managing Templates

You can view all available templates on the Templates page. Alternatively, you can access a template associated with a specific page on the Page Definition.

Topics in this section include:

Viewing Templates on the Templates Page

To view existing templates:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. You can narrow the display by making a selections from the following lists and clicking Go.

    • Template Name - Enter a case insensitive query.

    • Theme - View only templates in a specific theme.

    • Referenced - Select a type of template to display.

    • Type - Select a a type of template type.

    • Since - Restrict the report to a specific time frame. Select the amount of time to include in your report.

    • Subscribed - Specify whether to view All Templates, Subscribed Templates, or Not Subscribed Templates.

  6. To see a preview of a template, click the Run icon in the Preview column.

    Note that not all template types have the preview capability.

  7. To view or edit a template definition, click the template name.

    The template definition appears.

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

  8. Edit the appropriate attributes.

    Note that if you edit a template, you can make changes in one window and run your application in another by selecting the Return to Page check box on the right side of the template definition page. Selecting this check box keeps the page you are editing current after you click Apply Changes.

  9. Click Apply Changes.

Viewing Templates Associated with a Specific Page

To view templates associated with a specific page:

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

  2. Select an application.

  3. Select a page.

    The Page Definition appears. Templates associated with the current page display under the Templates heading in the far right column.

  4. To view or edit a template definition, click the template name.

    The Template Definition appears.

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

  5. Edit the appropriate attributes.

    Note that if you edit a template, you can make changes in one window and run your application in another by selecting the Return to Page check box on the right side of the template definition page. Selecting this check box keeps the page you are editing current after you click Apply Changes.

  6. Click Apply Changes.

Replacing Templates

You can update the template associated with a component using the Replace Templates Wizard.

To replace the template associated with a component:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. From the Task list, select Replace Templates.

  6. From Template Type, select a template and click Next.

  7. For Replace Templates, select the following:

    1. Change From - Select the template you want to change.

    2. Change To - Select the template you want to change to.

    3. Click Next.

  8. Click Finish.

Replacing All Templates within an Application

To replace all templates within an application with templates from another application:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. From the Task list, select Replace templates in this application with templates from another application.

  6. From Replace from Application, select an application and click Next.

  7. On Replace Templates, select a new template for each component and then select one of the following:

    • Replace copies the template definition

    • Replace/Subscribe copies the templates and adds a subscription.

  8. Click Replace Templates.

Viewing Region Position Utilization by Page Template

Regions are organized on a page by position (or Display Point). The possible display points for a region are determined by the page-level template.

To view region position utilization by page template:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. From the Task list, select View page template region position utilization.

    The Region Display Point Utilization report appears.

Unsubscribing to Templates

A subscribed template is a template that has its definition maintained in another template, the referenced template. If your application utilizes subscribed templates, you can unsubscribe to templates on the Unsubscribe Templates page.

To unsubscribe to templates:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. From the Task list, select Unsubscribe Templates.

    The Unsubscribe Templates page appears.

  6. To unsubscribe to a specific template type within the current theme, select the template type and click Unsubscribe.

Publishing Templates

Use the Publish Templates page to view templates that are subscribed to by other templates in your workspace.

To publish master template content to subscribing templates:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Templates.

    The Templates page appears.

  5. Click the Publish tab.

    The Published Templates page appears.

  6. Select those you want to publish and click Publish Checked.

Breadcrumb Templates

A breadcrumb template controls the display of breadcrumb entries. You select a breadcrumb template when you create a region.

About Breadcrumb Style Navigation

Breadcrumbs usually indicate where the current page is relative to other pages in the application. In addition, users can click a specific page to instantly view it. For example, the Oracle Application Express user interface includes breadcrumb paths at the top of each page.

Description of bc_menu.gif follows
Description of the illustration bc_menu.gif

See Also:

  • Online help for information about using specific sections of the Edit Breadcrumb Template page

  • "Creating Breadcrumbs"

Breadcrumb Template Attributes

This section describes specific sections of the Edit Breadcrumb Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings that require translation. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a copy of a master template, click Refresh.

Template Type

Select one of the following template styles:

  • Child Breadcrumb Entries displays all breadcrumb entries that are children of the current page parent breadcrumb (that is, peers of the current breadcrumb).

  • Current Breadcrumb displays all breadcrumb entries in sequence with a common parent.

  • Parent Breadcrumb Entries displays all breadcrumb entries for the current pages parent breadcrumb (that is, one level up from the current breadcrumb entry).

  • Parent to Leaf (breadcrumb style) displays the current page breadcrumb entry, its parent to the left, and so on, until the root node is reached.

Definition

Table 10-3 describes available breadcrumb Entry attributes.

Table 10-3 Breadcrumb Entry Control attributes

Attribute Description

Before First

Defines text that displays before the first breadcrumb entry.

Current Page Breadcrumb Entry

Defines the look of a breadcrumb entry that corresponds to the current page. This attribute supports the following substitution strings:

  • #NAME# specifies the short name of the breadcrumb entry.

  • #LINK# specifies the anchor target of the breadcrumb entry.

  • #LONG_NAME# specifies the long name of the breadcrumb entry.

Non Current Page Breadcrumb Entry

Defines the look of a breadcrumb entry that does not correspond to the current page. This attribute supports the following substitution strings:

  • #NAME# specifies the short name of the breadcrumb entry

  • #LINK# specifies the anchor target of the breadcrumb entry

  • #LONG_NAME# specifies the long name of the breadcrumb entry

After Last

Defines text that displays after the last breadcrumb entry.

Between Level

Defines text that displays between levels of breadcrumb entries. For example, if a breadcrumb has three levels this text would display at the "X" in the example that follows:

main X cars X porsche X 911

Maximum Levels

Specifies the number of levels that appear when displaying breadcrumbs in a breadcrumb style.


Link Attributes

Use Breadcrumb Link Attributes to specify hypertext link attributes for a breadcrumb entry.

Comments

Use this attribute to record comments about this component.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

Button Templates

Button templates enable application developers to customize the look and feel of a button. To build a button, you can use multiple images or HTML tags. Using button templates is optional.

Button Template Attributes

This section describes specific sections of the Edit Button Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Template Name identifies the name of the template. Use the Translatable check box to indicate if the template contains text strings that require translation. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a copy of a master template, click Refresh Template.

Definition

Use Template to define the button template that displays. You have the option of including standard application substitutions. For example, &ITEM_NAME. values can be substituted at rendering time. Button templates support the following substitution strings:

  • #LABEL# is replaced with a button label.

  • #LINK# is replaced with a URL. The URL then calls a #doSubmit# or a redirect JavaScript that submits the page (that is, setting the request value), or simply redirects it to the supplied URL.

Comments

Use this attribute to record comments about this component.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

Calendar Templates

Calendar templates control the appearance and placement of a calendar. Calendar templates frequently use HTML tables to arrange dates. You place calendar attributes using substitution strings such as #DD# and #MONTH#. A list of supported substitution strings appears on the right side of the Edit Calendar Template page. Note that template substitution strings must be in uppercase letters and begin and end with a number sign (#).

Calendar Template Attributes

This section describes specific sections of the Edit Calendar Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Calendar Definition

Name

Name identifies the name of the template. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Template Subscription

Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a copy of a master template, click Refresh.

Comments

Use this attribute to record comments about this component.

Monthly Calendar, Weekly Calendar, and Daily Calendar

Use the Monthly Calendar, Weekly Calendar, and Daily Calendar attributes to control the appearance and placement of specific calendars.

To learn more about a specific attribute, click the attribute label. When Help is available, the item label changes to red when you pass your cursor over it and the cursor changes to an arrow and question mark. See "About Field-Level Help".

Label Templates

Label templates are designed to centrally manage HTML markup of page item labels. Each item can have an optional label. You can control how these labels display using label templates. For example, you could create a label template called Required Field that references an image (such as an asterisk) to indicate to the user that the field is required.

Label templates enable you to define a before-and-after text string that gets prepended and appended to the item.

Label Template Attributes

This section describes specific sections of the Edit Label Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Template Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings that require translation. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a copy of a master template, click Refresh Template.

Definition

In Before Label, enter HTML to display before the item label. Before Label supports the substitution strings #CURRENT_FORM_ELEMENT#; #CURRENT_FORM_ID#, and #CURRENT_ITEM_NAME#. For example:

<label for="#CURRENT_ITEM_NAME#">
<a href="javascript:popupFieldHelp('#CURRENT_ITEM_ID#',
  '&APP_SESSION.','&CLOSE.')" > 

In After Label, enter HTML to display after the item label. Since the label will automatically display before the HTML in this region, any open HTML tags in the Before Label region should be closed here. For example:

</a></label>
Error Display

In On Error Before Label, enter HTML to precede the item label when an application displays an inline validation error message for the item. For example:

<font class="fieldtitleleft">#ERROR_MESSAGE#

In On Error After Label, enter HTML to be appended to the item label when an application displays an inline validation error message for the item. This attribute supports the substitution strings #CURRENT_FORM_ELEMENT#, #CURRENT_FORM_ID#, and #CURRENT_ITEM_NAME#. The following example would append a space and a closing bracket to the displayed item label with the error.

&nbsp;]</font>
Comments

Use this attribute to record comments about this object.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

List Templates

A list is a shared collection of links. You control the appearance of a list through list templates. Using template attributes, you can also define a list element to be either current or non current for a specific page.

About Hierarchical Lists

Oracle Application Express supports hierarchical lists. To create a hierarchical list, you must:

  • Select a list template that supports hierarchical lists. To determine which list templates support hierarchical lists, look for templates having the naming convention "with Sublist."

  • Select a Parent List Entry when you create each list entry.

See Also:

  • Online Help for information about using specific sections of the Edit List Template page

  • "Creating Lists"

List Template Attributes

This section describes specific sections of the Edit List Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings that require translation. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a copy of a master template, click Refresh Template.

Before List Entry

Enter HTML that displays before any list elements. You can use this attribute to open an HTML table or HTML table row.

Template Definition

Defines current and noncurrent list templates. Supported substitution strings include #LINK#, #TEXT#, #IMAGE_PREFIX#, #IMAGE#, #IMAGE_ATTR#, and #A01# to #A10#.

  • List Template Current. Enter HTML or text to be substituted for the selected (or current) list template.

  • List Template Current with Sub List Items. Enter HTML or text to be substituted for the selected (or current) list template when an item has sublist items. If not specified, the current list item template will be used.

  • List Template Noncurrent. Enter HTML or text to be substituted for the unselected (or noncurrent) list template.

  • List Template Noncurrent with Sub List Items. Enter HTML or text to be substituted for the unselected (or noncurrent) list template used when an item has sublist items. If not specified, the current list item template will be used.

  • Between List Elements. Enter HTML that displays between list elements. This attribute will be ignored if no HTML is specified.

Before Sub List Entry

Enter HTML that displays before any sublist elements.

Sub List Entry

Defines current and noncurrent list templates. Supported substitution strings include #LINK#, #TEXT#, #IMAGE_PREFIX#, #IMAGE#, #IMAGE_ATTR#, and #A01# to #A10#.

  • Sub List Template Current. Enter HTML or text to be substituted for the selected (or current) list template.

  • Sub List Template Current with Sub List Items. Enter HTML or text to be substituted for the selected (or current) list template when an item has sublist items. If not specified, the current list item template will be used.

  • Sub List Template Noncurrent. Enter HTML or text to be substituted for the unselected (or noncurrent) list template.

  • Sub List Template Noncurrent with Sub List Items. Enter HTML or text to be substituted for the unselected (or noncurrent) list template used when an item has sublist items. If not specified, the current list item template will be used.

  • Between Sub List Items. Enter HTML that displays between list elements. This attribute will be ignored if no HTML is specified.

After Sub List Entry

Enter HTML that displays after displaying sublist elements.

After List Entry

Enter HTML that displays after displaying all list elements. You can use this attribute to close an HTML table opened in the Before List Elements attribute.

Comments

Use this attribute to record comments about this object.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

Page Templates

Page templates define the appearance of a page. Each template consists of a header template, a body template, a footer template, and a number of subtemplates. If you do not specify a page template as a page-level attribute, then the Application Express engine uses the default page template defined on the Create/Edit Theme page.

Page templates combine static HTML with substitution strings that are replaced at run time. You use substitution strings to indicate the existence and placement of a component within a page template. You can further specify how a component should display using subtemplates.

Topics in this section include:

Supported Page Template Substitution Strings

Table 10-4 describes the available page template substitution strings. Note that all template substitution strings must be in uppercase letters and begin and end with a number sign (#).

To view a report of substitution strings supported by a given template, look at the Substitution Stings section of the Edit Page Template page. See "Page Template Attributes".

Table 10-4 Page Template Substitution Strings

Substitution String Description

#APP_VERSION#

Can be used in the Header or Footer sections of the page template. You define the value of #APP_VERSION# in the Version attribute on the Edit Definition page

See Also: "Name"

#BOX_BODY#

Identifies where the Body displays. If the Body is null, then #BOX_BODY# will be used instead.

#CUSTOMIZE#

Can be used in the Header, Body, or Footer sections of the page template.

The Customization section of the Region Definition enables you to turn on end-user customization. To utilize this feature, you must also include the #CUSTOMIZE# substitution string in the page template.

If at least one region supports end-user customization, a link called Customize appears wherever the #CUSTOMIZE# substitution string appears in the page template. When users click this link, a window displays enabling them to turn on and off regions on the page.

See Also: "Editing Region Attributes"

#FORM_CLOSE#

If a #FORM_OPEN# is included, then you must include a #FORM_CLOSE# in the header, body, or footer template. #FORM_OPEN# must appear before the #BOX_BODY# and #FORM_CLOSE# must appear after the #BOX_BODY# substitution string.

#FORM_OPEN#

Specifies where the HTML open form tag <form> is placed. You must include this substitution string in order to submit a form.

You do not need to code your own form open; the Application Express engine does it for you.

#GLOBAL_NOTIFICATION#

Displays the Global Notification attribute. Global notifications are intended to communicate system status, such as pending system downtime. You can also use APEX_APPLICATION.G_GLOBAL_NOTIFICATION to set this value programmatically.

See Also: "Global Notifications" for information about the Global Notification attribute

#HEAD#

Used after the <head> open tag but before the </head> close tag. You can optionally define the contents of #HEAD# for each page (for example, to reference additional style sheets or JavaScript libraries).

#LOGO#

Identifies an application logo.

In the Logo section of the Edit Definition page, you can identify an image and image attributes for an application logo. To utilize this feature, you must also include the #LOGO# substitution string in the Header or Body page template.

See Also: "Logo"

#NAVIGATION_BAR#

Defines the existence of navigation bar entries. A navigation bar will appear on every page in your application that uses a template that includes this substitution string.You can expand this substitution string using the Navigation bar subtemplate.

See Also: "Subtemplate" for information about the Navigation Bar subtemplate

#NOTIFICATION_MESSAGE#

Enables developers to communicate messages to the user. Defines where a summary of inline error messages is displayed. Inline error messages can be displayed next to a field, inline in the notification area, or both.

#ONLOAD#

Can be used in the Header and Footer section of the page template and should be placed inside the <body> html tag. For example:

<body #ONLOAD#>

Use this string as a substitute in a JavaScript call to be executed when a page is loaded by the Web browser. The JavaScript to be called can vary for each page.

#PARENT_TAB_CELLS#

Identifies the display of parent tabs. Parent tabs require standard tabs. If your application only has one level of tabs, you do not need this substitution string.

See Also: "Standard Tab Attributes" for information about defining Parent Tab Attributes

#REGION_POSITION_NN#

Identifies the exact placement of regions within a page. If no region is specified (for example, #REGION_POSITION_01#), then #REGION_POSITION_01# will be replaced with nothing.

#SUCCESS_MESSAGE#

Defines where in the page success and error messages appear. If the page process runs without raising errors, then this text displays.

You can customize the display of the success message for each template by adding HTML to be displayed before and after the success message.

#TAB_CELLS#

Identifies the display of standard tabs.

See Also: "Standard Tab Attributes"

#TITLE#

Defines the page title. Typically included within HTML title tags.


Page Template Attributes

This section describes specific sections of the Edit Page Template page. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Name identifies the name of the template. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class. Use the Translatable check box to indicate that the template contains text strings that require translation.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, select Refresh Template.

Definition

Each template consists of a header, a body, a footer, and subtemplates. Use substitution strings to include dynamic content. All template substitution strings must be in uppercase letters and begin and end with a number sign (#). See item Help for information about supported substitution strings.

Header is the first section of the page template. Enter HTML that defines the <Head> section of the HTML document. Regions that display or processes and computations that execute AFTER HEADER will display or execute immediately after this section in the template that is rendered. For example:

<html>
 <head>
   <title>#TITLE#</title>
   #HEAD#
 </head>

Body is the second section in the page template and is rendered after the header section but before the footer section. Enter HTML that defines the <Body> section of the HTML document. At a minimum, you must include the #BOX_BODY# substitution string. It is recommended that you also include the #FORM_OPEN# and #FORM_CLOSE# substitution strings. For example:

<body #ONLOAD#>
      #FORM_OPEN#
      #BOX_BODY#
      #FORM_CLOSE#
   </body>

Footer is the third section in the page template that displays after the body.

Display Points

Breadcrumb Display Point applies to generated components that use breadcrumbs. It defines where the breadcrumbs are placed on the page. Sidebar Display Point applies to generated components that use Sidebars. It defines where sidebars are placed on the page.

Subtemplate

Use Subtemplate to specify how a component should display. Available subtemplates include:

  • Success Message. Expands the #SUCCESS_MESSAGE# substitution string. You can define a success message either programmatically or as an attribute of a process. If a success message exists and if the page template includes the #SUCCESS_MESSAGE# substitution string, then this subtemplate is used to render the message.

  • Navigation Bar. Controls the display of navigation bar entries. Enter HTML or text to be substituted when the #NAVIGATION_BAR# substitution string is referenced in the template header, body, or footer. Use the #BAR_BODY# substitution string to identify where each navigation bar icon should display. In the following example, #BAR_BODY# substitution string will generate the appropriate HTML table cells:

    <table class="navBar"><tr>#BAR_BODY#</tr></table>
    
  • Navigation Bar Entry. Enter HTML or text to be substituted into the navigation bar #BAR_BODY# substitution string for each navigation bar entry. Use the following substitution strings to create the navigation bar entry subtemplate.

    Use the following substitution strings to compose the navigation bar entry subtemplate:

    • #LINK# - entry link

    • #TEXT# - entry sub text

    • #IMAGE# - entry image

      Note that the HTML image ALT, HEIGHT, and WIDTH arguments will be included with the HTML IMG tag when supplied with the navigation bar entry.

    • #EDIT# - Inline edit link editing capability

    • #WIDTH# - Image width

    • #HEIGHT# - Image height

    • #COLSPAN# - HTML COLSPAN value

    • #ALT# - Image alternative text

  • Notification. Enter HTML or text to be substituted when the #NOTIFICATION_MESSAGE# substitution string is referenced in the template header, body, or footer. Use the substitution string #MESSAGE# to indicate where the body of the message will appear in the Notification Message.

Standard Tab Attributes

You must populate this attribute if your application includes standard tabs. Standard tabs can be placed in the header, body, or footer sections of the page template using the #TAB_CELLS# substitution string. The page template Header/Body/Footer defines the HTML table and rows. This subtemplate defines how these tabs display by defining the specific cell. Available attributes include:

  • Current Tab. Enter HTML or text to be substituted for the currently selected standard tab. Whether a tab is current is determined by standard tab attributes. For example:

    <td>#TAB_LABEL#</td>
    
  • Non Current Standard Tab. Enter HTML or text that will be substituted for the unselected standard tabs. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example:

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    

See Also:

"Creating Tabs"
Parent Tab Attributes

You must populate this attribute if your application includes two levels of tabs. Enter HTML or text that will be substituted for the selected parent tabs. Parent tabs can be placed in the header, body, or footer section of the page template using the #PARENT_TAB_CELLS# substitution string. Parent tabs only display with standard tabs. Available attributes include:

  • Current Parent Tab. Enter HTML or text that will be substituted for the selected parent tabs. Whether a tab is current is determined by the page that displays and the standard tab set that the page uses. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example:

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    
  • Non Current Parent Tab. Enter HTML or text that will be substituted for the unselected parent tabs. Use the #TAB_TEXT# substitution string to position a tab's label and link within the template. For example:

    <td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
    

See Also:

"Creating Tabs"
Image Based Tab Attributes

Use this subtemplate for tabs that are entirely based on images. Available attributes include:

  • Current Image Tab. Enter HTML to be used to indicate that an image-based tab is currently selected. Include the #TAB_TEXT# substitution string to show the displayed name of the tab.

  • Non Current Image Tab. Enter the HTML to be used to indicate that an image tab is not currently selected. Include the #TAB_TEXT# substitution string to show the displayed name of the tab.

Multi Column Region Table Attribute

If the Application Express engine displays regions in multiple columns in the same region position, then Oracle Application Express will render an HTML table. This attribute enables you to control the attributes of the <table> tag.

Error Page Template Control

Use this attribute only when a page template will be designated as an error template. Use the #MESSAGE# substitution string to place the error message and the #BACK_LINK# substitution string to display a link back to the previous page. A template can be designated as an error template by editing the application attributes. For example:

#MESSAGE#

<br>

<a href="#BACK_LINK#">back</a>
Comments

Use this attribute to record comments about this component.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

Popup LOV Templates

Popup LOV templates control how popup lists display for all items defined as POPUP. You can only specify one popup LOV template for each theme.

Popup List of Values Template Attributes

This section describes specific sections of the Edit Popup List of Values Template page. You can access the sections of the page either by scrolling down the page or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Application

Theme indicates the theme to which the template is a member. Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class. Use the Translatable check box to indicate that the template contains text strings that require translation.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, click Refresh Template.

Icon

Use Popup Icon to specify an icon to display to the right of a form field for items of type POPUP. By default, the Application Express engine uses a list.gif image. Use Popup Icon Attr to define image attributes, such as height and width, for the Popup Icon.

Search Field

Use these attributes to specify how a Search field displays. Table 10-5 describes available Search Field attributes.

Table 10-5 Search Field Attributes

Attribute Description

Before Field Text

Defines text to display before the popup list of values search field displays.

Filter Width

Displays the text field using this width.

Filter Max Width

Displays the text field widget using this maximum width.

Filter Text Attribute

Displays the text field using these attributes. This will be included within the HTML input tag.

After Field Text

Displays this text after displaying the search field, the search button, and the close button.


Buttons

Use these attributes to define the button name and attributes for the Find, Close, Next, and Previous buttons.

Window

Popup lists of values are executed using JavaScript. Use these attribute to control the values of scrollbars=, resizable=, width=, and height=. For information about default values, see item Help.

Pagination

Defines how row count results display.

Result Set

Use these attributes to define text or HTML to display before and after a result set.

Page Attributes

Use these attributes to define popup pages. For more information, see item Help.

Region Templates

Region templates control the appearance and placement of region attributes. Region templates frequently use HTML tables to arrange content.

Region templates apply style elements to regions. Region templates display substitution strings. The only required substitution string, #BODY#, identifies where the source of the region should be placed. All other substitution strings are optional. You can use these substitution strings to indicate the existence and placement of a page control, such as a button, within the region.

Region Template Attributes

This section describes specific sections of the Edit Region Template page. You can access the sections of the page either by scrolling down the page or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Name identifies the name of the template. Theme indicates the theme to which the template is a member.

Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class. Use the Translatable check box to indicate that the template contains text strings that require translation.

Subscription

Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, click Refresh Template.

Definition

Region templates provide the appearance for a portion of a page called a region. Use substitution strings to indicate the existence and placement of a component within the region. #BODY# is the only required substitution string. It identifies where the source of the region should be placed. All other substitution strings are optional. The following are valid substitution strings:

  • #TITLE#

  • #EXPAND#

  • #CHANGE#

  • #BODY#

  • #FORM_OPEN#

  • #FORM_CLOSE#

When you create a button in a region position, the positions you define will appear in a select list. Use the following substitution strings to define positions for the placement of buttons in a region:

  • #EDIT#

  • #CLOSE#

  • #CREATE#

  • #EXPAND#

  • #HELP#

  • #DELETE#

  • #COPY#

  • #NEXT#

  • #PREVIOUS#

Form Table Attributes

Page items display within regions. Items are rendered as HTML form elements in an HTML table. With this template property, you can define attributes that will be placed in the <table> tag. For example:

class="instructiontext"
Comments

Use this attribute to record comments about this component.

Substitution Strings

Lists substitution string usage for this template. Substitution strings are used within subtemplates to reference component values.

Report Templates

Report column templates provide you with control over the results of a row from a SQL query. This type of template defines a cell, not an entire row.

Each report template identifies column names using the syntax #1#, #2#, #3#, and so on. You can also name columns using column name substitution syntax such as #ENAME# or #EMPNO#. You can reference any item from your application within your template. For example, to reference an item called ABC. in your template, you could include the exact substitution string &ABC.. The actual value of ABC. would be provided by an end user editing an item in your application named ABC.

Topics in this section include:

About Generic Column Templates and Named Column Templates

Oracle Application Express includes two types of report templates:

  • Generic column templates

  • Named column templates

Generic Column Templates

A generic column template determines the appearance of a report by defining the look of the column once. This look is then repeated as many times as is necessary, based on the number of columns specified in the report's definition. This type of template is limited to reports that have a standard row and column structure. Additional style can be applied to a report using this type of template through the use of conditions.

The following example demonstrates how to have each column use a specific style:

<td class="tabledata" align="#ALIGN#">#COLUMN_VALUE#</td>

This example assumes your page template includes a CSS containing the class tabledata. This example also demonstrates the use the substitution strings #ALIGN# and #COLUMN_VALUE#. If you actually ran this report, these substitution strings would be replaced with values generated by the results of a SQL query.

If your query uses an expression in the select list, it is a good idea to create an alias for the columns to avoid run time errors. For example, suppose your query was as follows:

SELECT ename, (sal + comm) * 12 FROM emp

You could rewrite the query to alias the columns as follows:

SELECT ename, (sal + comm) * 12 yearly_comp FROM emp
Named Column Templates

Named column templates allow for more flexibility in report design. However, because they reference columns by name, they can only be used by reports that are based on those columns. For example:

<tr><td>#ENAME#</td><td>#SAL#</td></tr>

Although named column templates offer flexibility, you may need to create a new template for each query. You can also include a position notation. The following example demonstrates how to use following HTML and substitution strings:

<tr><td>#ENAME#</td><td>#SAL#</td></tr>

<tr><td>#1#</td><td>#2#</td></tr>

Report Column Template Attributes for Generic Column Templates

This section describes specific sections of the Edit Report Template page for Generic Column Templates. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Report Template

Template Name identifies the name of the template. Template Type indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference the #COLUMN_VALUE# substitution string in the template.

Theme indicates the theme to which the template is a member. Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class. Use the Translatable check box to indicate the template contains text strings that require translation.

Template Subscription

Use Template Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, click Refresh Template.

Before Rows

In Before Rows, enter HTML that displays once at the beginning of a report template. Opening an HTML table is a common use of this attribute as shown in the following example:

<table>

You can identify column headers using the syntax #1#, #2#, #3#. For example:

<th>#1#</th><th>#2#</th><th>#3#</th>

You can include pagination above a report by including the substitution string #TOP_PAGINATION#. This substitution string generates HTML that starts with an opening <tr> tag and ends with a closing </tr> tag. For example, to include an open table tag and the #TOP_PAGINATION# substitution string, you would enter the following:

<table>#TOP_PAGINATION#

You can also include the substitution string #CSV_LINK# to include support for exporting your report to comma-separated value (CSV) format, a format compatible with most spreadsheet programs.

Column Headings

Use Column Heading Template to add color to each column header cell. Note that the text of this attribute must indicate where the cell heading text will be colorized. For example:

<th #ALIGNMENT#>#COLUMN_HEADER#</th>

If you do not want any column headings, enter the following:

OMIT

If you do use this attribute, Application Express engine applies the default column heading template.

Before Each Row

In Before Each Row, enter text to display before all columns in the report. Use this attribute to open a new HTML row. Before Each Row supports the following substitution strings:

  • #ROWNUM#

    Use this substitution string to specify the current row.

  • #COLCOUNT#

    Use this substitution string to specify the number of columns.

  • #HIGHLIGHT_ROW#

    Use this substitution string to specify the number of highlighted rows.

Column Templates

Column templates define the look of each column. You can define up to four column templates; each can be conditional. For example, you can have different background colors for even and odd rows, or highlight rows that meet a PL/SQL defined condition.

In each Column Template, you define the look of each column. Column Templates support the substitution strings described in Table 10-6.

Table 10-6 Column Template Substitution Strings

Substitution String Description

#ALIGNMENT#

Determines the column alignment. Specified by the user.

#COLCOUNT#

Defines the count of the number of columns.

#COLNUM#

Defines the current column number.

#COLUMN_HEADER#

Defines the column header.

#COLUMN_VALUE#

Replaced with the value of the column.

#ROWNUM#

Specifies the current row number.


Consider the following example:

<td> #ALIGNMENT#>#COLUMN_VALUE#</td>

If you actually ran this report, these substitution strings would be replaced with values generated by the results of a SQL query.

By creating conditions, you can create a report that displays columns differently depending on whether the specified condition is met. To specify a column template be used conditionally, select a condition type from the Column Template Condition list. Valid values include:

  • Use Based on PL/SQL Expression. Conditionally formats columns based on data in that row.

  • Use for Even Numbered Rows. Conditionally formats even numbered rows.

  • Use for Odd Numbered Rows. Conditionally formats odd numbered rows.

If you select Use Based on PL/SQL Expression, the next step is to enter a PL/SQL expression in the Column Template Expression field. For example, the following expression displays a value in bold if the value is greater than 2000:

#SAL# > 2000

Note that you could also use the substitution string #ROWNUM#. For example:

#ROWNUM# > 2000
After Each Row

In After Each Row, enter HTML that displays after all columns in the report display. This attribute is often used to close an HTML table row. For example:

</tr>
After Rows

Use After Rows to specify text that should display after the last row. A common use of this attribute is to close the HTML table tag. For example:

</table>

The After Rows attribute supports the following substitution strings:

  • #PAGINATION#

    Replaced with a pagination attribute.

  • #COLCOUNT#

    Substituted at run time with the number of columns defined in the report.

Row Highlighting

Use Background color for checked row to control the background color of a report row when the row selector is checked. Use Background color for current row to control the background color of a report row when the user moves the mouse over the row.

Pagination Subtemplate

The Pagination Subtemplate section contains attributes for editing the Pagination Template, Next Page Template, Previous Page Template, Next Set Template, and Previous Template. Pagination Subtemplates support the substitution strings #PAGINATION_NEXT#, #PAGINATION_NEXT_SET#, #PAGINATION_PREVIOUS# and #PAGINATION_PREVIOUS_SET#. Table 10-9 describes these templates.

Table 10-7 Pagination Subtemplate Attributes

Pagination Subtemplate Attribute Description

Pagination Template

Applies to the entire pagination subtemplate. For example:

<span class="instructiontext">#TEXT#</span>

You can use the substitution string #TEXT# to specify where you want the pagination subtemplate to display.

Use the other Pagination Subtemplate attributes to modify individual items.

Next Page Template

Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example:

<a href="#LINK#">next</a>

Previous Page Template

Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example:

<a href="#LINK#">previous</a>

Next Set Template

Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example:

<a href="#LINK#">next set</a>

Previous Set Template

Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example:

<a href="#LINK#">previous set</a>

Comments

Use this attribute to record comments about this component.

Report Column Template Attributes for Named Column Templates

This section describes specific sections of the Edit Report Template page for Named Column Templates. You can access the sections of the page by either scrolling down the page, or by clicking a navigation button at the top of the page. Note that when you select a button at the top of the page, the selected section appears and all other sections are temporarily hidden. To view all sections of the page, click Show All.

Name

Template Name identifies the name of the template. Template Type indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference the #COLUMN_VALUE# substitution string in the template.

Theme indicates the theme to which the template is a member. Use the Translatable check box to indicate the template contains text strings that require translation. Template Class identifies a specific use for the template. When you switch to a new theme, all templates in one theme are mapped to corresponding templates in another theme. Application Builder accomplishes this template mapping through the assignment of a template class.

Subscription

Use Subscription to apply an existing template to the current application. When you select an existing template, you become a subscriber to that template.

To load a new copy of a master template, click Refresh.

Row Templates

Row templates define the look of each column. You can define up to four row templates, each of which can be conditional.

In each Row Template, you define the look of each row. Row Templates support the substitution strings described in Table 10-8.

Table 10-8 Row Template Substitution Strings

Substitution String Description

#ALIGNMENT#

Determines the row alignment. Specified by the user.

#COLCOUNT#

Defines the count of the number of columns.

#COLNUM#

Defines the current column number.

#COLUMN_HEADER#

Defines the column header.

#COLUMN_VALUE#

Replaced with the value of the column.

#ROWNUM#

Specifies the current row number.


By creating conditions, you can create a report that displays rows differently depending on whether the specified condition is met. To specify a row template be used conditionally, select a condition type from the Column Template Condition list. Valid values include:

  • Use Based on PL/SQL Expression. Conditionally formats columns based on data in that row.

  • Use for Even Numbered Rows. Conditionally formats even numbered rows.

  • Use for Odd Numbered Rows. Conditionally formats odd numbered rows.

If you select Use Based on PL/SQL Expression, the next step is to enter a PL/SQL expression in the Column Template Expression field. For example, the following expression displays a value in bold if the value is greater than 2000:

#SAL# > 2000

Note that you could also use the substitution string #ROWNUM#. For example:

#ROWNUM# > 2000
Column Headings

Use this template to add color to each column header cell. The text of this attribute must include help to indicate where the cell heading text should be colorized. If you do not enter a Column Heading Template, then a default column header template is applied. If you do not want any column headings, then enter OMIT. For example:

<th #ALIGNMENT#>#COLUMN_HEADER#</th>
Before first and after last row text

In Before Rows, enter HTML that displays once at the beginning of a report template. Opening an HTML table is a common use of this attribute, as shown in the following example:

<table>

You can identify column headers using the syntax #1#, #2#, #3#. For example:

<th>#1#</th><th>#2#</th><th>#3#</th>

You can include pagination above a report by including the substitution string #TOP_PAGINATION#. This substitution string generates HTML that starts with an opening <tr> tag and ends with a closing </tr> tag. For example, to include an open table tag and #TOP_PAGINATION# substitution string, you would enter the following:

<table>#TOP_PAGINATION#

You can also include the substitution string #CSV_LINK# to include support for exporting your report to CSV format, a format compatible with most spreadsheet programs.

Use After Rows to specify text that should display after the last row. A common use of this attribute is to close the HTML table tag. For example:

</table>

The After Rows attribute supports the following substitution strings:

  • #PAGINATION#

    Replaced with a pagination attribute.

  • #COLCOUNT#

    Substituted at run time with the number of columns defined in the report.

Pagination

The Pagination section contains attributes for editing the Pagination Template, Next Page Template, Previous Page Template, Next Set Template, and Previous Template. Pagination Subtemplates support the substitution strings #PAGINATION_NEXT#, #PAGINATION_NEXT_SET#, #PAGINATION_PREVIOUS# and #PAGINATION_PREVIOUS_SET#. Table 10-9 describes these templates.

Table 10-9 Pagination Subtemplate Attributes

Pagination Subtemplate Attribute Description

Pagination Template

Applies to the entire pagination subtemplate. For example:

<span class="instructiontext">#TEXT#</span>

You can use the substitution string #TEXT# to specify where you want the pagination subtemplate to display.

Use the other Pagination Subtemplate attributes to modify individual items.

Next Page Template

Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example:

<a href="#LINK#">next</a>

Previous Page Template

Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example:

<a href="#LINK#">previous</a>

Next Set Template

Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example:

<a href="#LINK#">next set</a>

Previous Set Template

Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example:

<a href="#LINK#">previous set</a>

Comments

Use this attribute to record comments about this component.

About Using JavaScript in Column Templates

You can conditionally display HTML depending upon values in the database using JavaScript. The following example displays an HTML row only if the GROUP_DESC query column is not null:

<script language="javascript">
IF ( "#GROUP_DESC#" != "" )
document.writeln( "<TR>;
<TD BGCOLOR=#336699>;</TD>
</TR>
</TR>
<TD>#GROUP_DESC#</TD>
                </TR>" );
        </TR>" );

See Also:

  • Online Help for information about using specific sections of the Edit Report Template page

  • "Understanding Regions"

Using Custom Cascading Style Sheets

A cascading style sheet (CSS) provides a way to control the style of a Web page without changing its structure. When used properly, a CSS separates visual attributes such as color, margins, and fonts from the structure of the HTML document. Oracle Application Express includes themes that contain templates that reference their own CSS. The style rules defined in each CSS for a particular theme also determine the way reports and regions display.

Topics in this section include:

Uploading Cascading Style Sheets

You upload cascading style sheets to your workspace using the Cascading Style Sheet Repository. Uploaded cascading style sheets (CSS) are available to any application created in your workspace. The cascading style sheets are written to the file system, so you can reference them in your HTML source code.

To upload cascading style sheets:

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

  2. Select an application.

  3. Click Shared Components.

    The Shared Components page appears.

  4. Under Files, select Cascading Style Sheets.

    The Cascading Style Sheet page appears.

  5. From the View list, select Details. See "About the Cascading Style Sheets Page".

  6. To upload a CSS, click Create and follow the on-screen instructions.

  7. To edit an existing CSS, select the CSS name.

  8. To download an existing CSS, click the Download icon.

About the Cascading Style Sheets Page

Once you upload a CSS to the CSS Repository, you control how the page displays by making a selection from the View list. Available options include:

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

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

Referencing an Uploaded Cascading Style Sheet in the Page Template

You can reference an uploaded cascading style sheet within the Header section of the page template. You use the Header section to enter the HTML that makes up the <HEAD> section of the HTML document.

To reference an uploaded cascading style sheet:

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

  2. Select an application.

  3. Click Shared Components.

  4. Under User Interface, select Themes.

    The Themes page appears.

  5. On the Tasks list, click View Templates.

  6. Select the name of the page template you want to edit.

  7. Use a <link> tag within the head section to reference the appropriate style sheet.

    To reference an uploaded file that is associated with a specific application, you would use the substitution string #APP_IMAGES#. For example:

    <html>
    <head>
        <title>#TITLE#</title>
        #HEAD#
        <link rel="stylesheet" href="#APP_IMAGES#sample2.css" type="text/css">
    </head>
    ...
    

    To reference an uploaded file that is associated with a specific workspace, you would use the substitution string #WORKSPACE_IMAGES#. For example:

    <html>
    <head>
        <title>#TITLE#</title>
        #HEAD#
        <link rel="stylesheet" href="#WORKSPACE_IMAGES#sample3.css" type="text/css">
    </head>
    ...