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 (button, calendar, label, list, breadcrumb, page, popup LOV, 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 HTML DB to map templates among themes, making it easy to quickly change the entire look and feel of an application.
Topics:
You manage themes on the Themes page.
To access the Themes page from Shared Components:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
The Themes page appears.
To access the Details view, select Details from the View list.
The currently selected theme displays a check mark in the current column.
To access the Themes page from the Page Definition:
Navigate to the Workspace home page.
Click the Application Builder icon.
Select an application.
Select a page.
The Page Definition appears.
Select the theme name.
Once you create a theme, it appears on the Themes page. You control how the page displays by selecting the following options from the View list:
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 Display list:
Summary View displays the theme ID, name, and current status.
Detailed View displays the theme ID, name, current status, and the number of templates in each template type.
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 Define Theme page.
You can override these defaults, by either selecting another template when you create new 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:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Access the Details view. From the View list, select Details.
Select the appropriate theme name.
Create/Edit Theme page appears.
The top of the page displays the associated application ID and the Theme Identification Number.
To change the theme name, enter a new name in the Name field.
To change a default template, make a new selection from the appropriate list.
Table 7-4 describes the default templates available under the section Default Templates by Component.
Table 7-4 Default Templates by Component
Attribute | Description |
---|---|
Page |
Identifies the default template for displaying pages. If a developer does not explicitly choose a template, then the HTML DB engine uses the template specified here. Once defined, this default template appears on the Edit Application Attributes 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 |
Optional. 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 Application Attributes page under the heading Application Template Defaults. |
Printer Friendly Page |
Identifies the template to be used when the HTML DB engine is in printer friendly mode. When calling the HTML DB to render a page, you have the option to identify a printer friendly attribute with values of YES or NO. If you select Once defined, this default template appears on the Edit Application Attributes page under the heading Application Template Defaults. See Also: "Optimizing a Page for Printing" |
Breadcrumb |
Identifies the default breadcrumb template used when you create new breadcrumb. |
Button |
Identifies the default button template used when creating a new button. |
Calendar |
Specifies the default calendar template used when you create new calendar. |
Label |
Identifies the default label template used when you create new label. |
List |
Specifies the default list template used when you create new list. |
Region |
Specifies the default region template used when you create new region. |
Report |
Identifies the default region template used when you create a report. |
Table 7-5 describes the default templates available under the section Default Templates by Region Type.
Table 7-5 Region Templates by Region Type
Attribute | Description |
---|---|
Breadcrumbs |
Default region template used when creating a breadcrumb. |
Charts |
Default chart template used when creating a chart. |
Forms |
Default form template used when creating a form. |
Lists |
Default region template used when creating a list. |
Reports |
Default region template used when creating a report. |
Tabular Forms |
Default region template used when creating a tabular form. |
Wizards |
Default region template used when creating a new wizard component. |
You can create a new theme from scratch or select an existing theme from the HTML DB repository.
To create a new theme:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Create Theme.
Specify whether to select a theme from the HTML DB repository, or create a theme from scratch.
If you select From the HTML DB Repository:
Select a theme from the repository.
Click Create.
If you select From Scratch:
Specify a name.
Click Create.
Themes page appears.
Define the default templates for the new theme:
Click the Edit icon adjacent to the new theme name.
To change the theme name, enter a new name in the Name field.
When the Define Theme page appears, select default templates for the new theme.
When you switch to a new theme, all components that are assigned a template are assigned to a corresponding template in the new theme. Application Builder accomplishes template mapping through the assignment of template class identifiers.
Note: You can only switch to a new theme if another theme already exists. |
To apply a theme to an application:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Switch Theme.
The Switch Theme page appears.
From the Switch to Theme list, select a new theme and click Next.
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.
Click Next to continue.
Click Switch Theme.
Each theme is identified by a numeric identification number (ID). When you copy a theme you specify a new theme ID. Copying a theme is useful if you want to experiment with editing a theme or to export a theme with a different ID.
To copy a theme:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
From the Tasks list, select Copy Theme.
On Copy Theme:
Copy From Theme - Select the theme you want to copy.
Copy to this Theme Identification Number - Enter a new ID for the theme.
Click Next.
Click Copy Theme ID.
You can only delete inactive themes. When you delete a theme, Application Builder only removes inactive templates.
To delete a theme:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
From the Tasks list, select Delete Theme.
From Remove Theme, select the theme you want to delete and click Next.
Click Remove Theme.
You export a theme in the same way you export any related application file. Exporting a theme from one Oracle HTML DB development instance to another involves the following steps:
Export the theme using the Export Theme utility.
Import the exported file into the target Oracle HTML DB instance.
Install the exported file from the Export Repository.
Each theme has an identification number (ID). You can use the Change Theme ID utility to change a theme ID to another 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:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
From the Tasks list, select Change Identification Number.
On the Change Theme ID page:
Select a theme.
Specify a new identification number.
Click Next.
Confirm your changes and click Change Theme ID.
Application Builder includes a number of reports designed to help you manage themes and templates.
Topics:
To view all templates that comprise a theme:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Reports.
On the Theme Reports page:
From Report, select Application Templates.
From Theme, select a theme.
Click Go.
A listing of templates displays listing the template type, template name, the associated theme, and template class.
To edit a template, select the template name.
The Theme Template Count report lists which template classes currently have templates created for them.
To view the Theme Template Count report:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Reports.
On the Theme Reports page:
From Report, select Theme Template Counts.
From Theme, select a theme.
Click Go.
If you are using custom classifications, select Show Custom and click Go.
The File References report displays a listing of all files associated with templates, shared components, or page components in the current application.
To view the File References report:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
On the Themes page, click Reports.
On the Theme Reports page:
From Report, select File References.
From Theme, select a theme.
Click Go.
On the File References page:
From Show, select the type of component to include in the report. If you do not make a selection, no results are returned.
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 ID. Select the page ID to link to a Page Definition.
Without context displays only the file name and the image (if applicable).
From File Extensions, select the type of extensions for which to search.
Click Go.
To download a comma-delimited file (.csv) version of this report, click Download CSV at the bottom of the page.
Accessing the Class References report displays a listing of classes associated with templates, shared components, or page components in the current application.
To view the Class References report:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Reports.
On the Theme Reports page:
From Report, select Class References.
From Theme, select a theme.
Click Go.
On the Class References page:
From Show, select the components to check for a class reference. If you do not make a selection, no results are returned.
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 ID.
Without context displays only the referenced class.
Click Go.
To download a comma-delimited file (.csv) version of this report, click Download CSV at the bottom of the page.
Use the Template Substitution Strings report to view all supported substitution strings by component.
To view the Substitution String report:
Navigate to the Themes page:
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Themes.
Click Reports.
On the Theme Reports page:
From the Report list, select Template Substitution Strings.
From the Theme list, select which themes to include in the report.
Click Go.
To link to a template definition, select the component name.