The HTML DB 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 simplest 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:
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 HTML DB 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.
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 HTML DB engine uses the Page template specified on the Themes page.
To specify a default page template within a theme:
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.
Change the View. From View, select Details.
In the Themes list, select the theme name.
Under Default Templates by Component, make a selection from the Page list.
To specify an page-level template for a specific page:
Navigate to the Workspace home page
Click the Application Builder icon.
Select an application.
Select a page.
Click Edit Attributes.
Locate the section Primary Display Attributes.
Make a selection from the Page Template list.
You can view all available templates on the Templates page. Alternatively, you can view the templates used on a specific page on the Page Definition.
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Templates.
The Templates page appears.
You can narrow the display by making a selections from the following lists and clicking Go.
Theme - View only templates in a specific theme.
Show - View a specific type of template.
View - View all templates, those currently referenced, or those not referenced.
To view a template definition, click the template name.
To see a preview of a template, click the Run icon in the Preview column.
Note: Not all template types have the preview capability. |
To view existing templates 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. Templates associated with the current page display under the Templates heading in the far right column.
To view attributes of an existing template, click the template name.
If you need to create a custom template, it is generally simplest 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:
Navigate to the Templates page.
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Templates.
Click Create.
Select the type of template you want to create.
Select a creation method:
From Scratch
As a Copy of an Existing Template
Follow the on-screen instructions. Be careful to associate your template with the correct theme.
Oracle HTML DB includes reports describing template utilization, subscription, and edit history.
To view template reports for the current 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 Templates.
You can narrow the display by making a selections from the following lists and clicking Go.
Theme - View only templates in a specific theme.
Show - View a specific type of template.
View - View all templates, those currently referenced, or those not referenced.
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 developer and last update date.
Once you create a custom template, you can quickly edit it from either the Templates page or from the Page Definition.
To edit an existing template from the Templates page:
Navigate to the Templates page.
Navigate to the Workspace home page and click the Application Builder icon.
Select an application.
Click Shared Components.
Under User Interface, select Templates.
You can narrow the display by making a selections from the following lists and clicking Go.
Theme - View only templates in a specific theme.
Show - View a specific type of template.
View - View all templates, those currently referenced, or those not referenced.
Locate the template you want to edit and select the template name.
Follow the on-screen instructions.
As you edit templates, you can make changes in one window and run your application in another by selecting Return to Page. Selecting this check box, keeps the page you are editing current after you click Apply Changes.
A breadcrumb template controls the display of breadcrumb entries. You select a breadcrumb template when you create a region.
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. Oracle HTML DB includes breadcrumb paths beneath the standard tabs (or second level navigation tabs) at the top of each page.
See Also:
|
This section describes specific sections of the Breadcrumb Template page.
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.
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.
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 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.
Table 7-6 describes available breadcrumb Entry attributes.
Table 7-6 Breadcrumb Entry Control attributes
Attribute | Description |
---|---|
Defines text that displays before the first breadcrumb entry. |
|
Defines the look of a breadcrumb entry that corresponds to the current page. This attribute supports the following substitution strings:
|
|
Defines the look of a breadcrumb entry that does not correspond to the current page. This attribute supports the following substitution strings:
|
|
Defines text that displays after the last breadcrumb entry. |
Use Breadcrumb Link Attributes to specify hypertext link attributes for a breadcrumb entry.
Use Between Levels to specify text that displays between each level of a breadcrumb breadcrumb. For example, if your breadcrumb has three levels, this text would display at the "X" in the example that follows:
main X cars X porsche X 911
In Max Levels specify the number of levels when displaying breadcrumbs.
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.
This section describes specific sections of the Button Template page.
Template Name identifies the name of the template. Use the Translatable check box to indicate if the template contains text strings which 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.
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.
Defines 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 which submits the page (that is, setting the request value), or simply redirects it to the supplied URL.
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 Calendar Template Attributes page. Note that template substitution strings must be in uppercase letters and begin and end with a number sign (#).
This section describes specific sections of the Calendar Template page.
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 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.
In Month Title Format enter the format for the monthly title that appears at the top of each month. This is the first part of a calendar which prints on the page. For example:
<table> <tr> <td>#MONTH#</td> </tr>
In Day of Week Format enter the format for the week day names which displays as the column header for that day of the week. For example:
<th width="14%">#IDAY#</th>
In Month Open Format enter HTML to be used to open a month. This displays immediately after the Month Title Format. Typically this attribute contains an HTML tag that functions as a container (such as a table). For example:
<table border="0" cellpadding="0" cellspacing="0" class="htmldbRowWithBorders" width="100%"><tr>
In Close Month Format enter HTML to be used to close a month. Since this is the last part printed, this attribute should contain HTML that closes the HTML tags used in the Month Open Format. For example:
</table>
Enter HTML to open and close a week.
In Week Open Format enter HTML to be used to open a week. This is printed for each week. Typically this attribute contains an HTML tag which functions as a container. For example:
<tr>
In Week Close Format enter HTML to be used to close the week. Since this is the last part printed, this attribute should contain HTML that closes HTML tags used in Week Open Format.
</tr>
Enter HTML to format the days that occur during the work week (that is, Monday through Friday).
In Day Title Format enter HTML to be used the title of each day. This title displays after the Day Open Format. For example:
#DD#
In Day Open Format enter HTML to used to open a day. This displays on each day in the calendar. Typically this attribute contains an HTML tag that functions as a container. For example:
<td>
In Day Close Format enter HTML used to close a day. Since this is the last part printed, this attribute should close any HTML tags used in Day Open Format. For example:
</td>
In Today Open Format enter HTML used to open today. Typically this attribute contains an HTML tag which functions as a container (such as <td>
) and would be different from the Day Open Format. For example:
<td style="background:#c5d5c5">
A non-day is not part of the current month. For example, suppose the first of a month is a Monday, but the week starts on a Sunday. Because Sunday is not part of the current month, Sunday would be a non-day. Use these attributes to format non-days.
In Non-Day Title Format enter a non-day title. For example:
#DD#
In Non-Day Open Format enter HTML to open a non-day. Typically this attribute would contain an HTML tag that functions as a container. For example:
<td>
In Non-Day Close Format enter HTML to close a non-day. Typically this attribute would contain an HTML tag that closes the tag used in Non-Day Open Format. For example:
</td>
Enter HTML used to format days that occur on the weekend. Include substitution strings to include dynamic content. To view a list of supported substitution strings, see the Substitution Strings list on the right side of the Calendar Template page.
In Weekend Title Format, enter HTML to be used for a day occurring on a weekend. For example:
#DD#
In Weekend Open Format, enter HTML to open a day which is on a weekend. Typically this attribute would contain an HTML tag that functions as a container. For example:
<td>
In Weekend Close Format, enter HTML to close a day which is in a weekend. Since this is the last part printed, this attribute should close any HTML tags used in Weekend Open Format.For example:
</td>
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.
This section describes specific sections of the Label Template page.
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 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 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.
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#', '&SESSION.','&CLOSE.')" >
In After Label, enter HTML to display after the item label. Since the label will be 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>
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#</font>
In On Error After Label enter HTML to be appended to the item label when a 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.
]</font>
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.
Oracle HTML DB 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:
|
This section describes specific sections of the List Template page.
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.
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.
Enter HTML that displays before any list elements. You can use this attribute to open an HTML table or HTML table row.
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.
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 Elements. Enter HTML that displays between list elements. This attribute will be ignored if no HTML is specified.
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 HTML DB engine uses the default page template defined on the Define 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:
Table 7-7 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 (#).
Table 7-7 Page Template Substitution Strings
Substitution String | Description |
---|---|
Can be used in the Header or Footer sections of the page template. You define the value of See Also: "Name" |
|
Identifies where the Body displays. If the Body is null, then |
|
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 If at least one region supports end user customization, a link called Customize appears wherever the |
|
If a |
|
Specifies where the HTML open form tag You do not need to code your own form open, the HTML DB engine does it for you. |
|
Displays the Global Notification attribute. Global notifications are intended to communicate system status, such as pending system downtime. You can also use See Also: "Global Notifications" for information about the Global Notification attribute |
|
Used after the |
|
Identifies an application logo. In the Logo section of the Edit Application Attributes page, you can identify an image and image attributes for an application logo. To utilize this feature, you must also include the See Also: "Logo" |
|
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 Navigation Bar subtemplate |
|
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. |
|
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. |
|
Identifies the display of parent tabs. Parent tabs require standard tabs. If your application only has one of level tabs, you do not need this substitution string. See Also: "Standard Tab Attributes" for information about defining Parent Tab Attributes |
|
Identifies the exact placement of regions within a page. If no region is specified (for example, |
|
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. |
|
Identifies the display of standard tabs. See Also: "Standard Tab Attributes" |
|
Defines the page title. Typically included within HTML title tags. |
This section describes specific sections of the Page Template page.
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.
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.
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 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.
Breadcrumb Display Point applies to generated components that use breadcrumbs and defines where the breadcrumbs are placed on the page. Sidebar Display Point applies to generated components that use Sidebars and defines where sidebars are placed on the page.
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.
Navigation Bar Entry. Enter HTML or text that 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.
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 in the Notification Message the body of the message will appear.
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 or not 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>
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 may be placed in the header, body, or footer section of the page template using the #PARENT_TAB_CELLS#
substitution string. Parent tabs only display in conjunction with standard tabs. Available attributes include:
Current Parent Tab. Enter HTML or text that will be substituted for the selected parent tabs. Whether or not a tab is current is determined by the page that displays and the standard tab set the page uses. Use #TAB_TEXT#
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 #TAB_TEXT#
to position a tab's label and link within the template. For example
<td><a href="#TAB_LINK#">#TAB_LABEL#</a></td>
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.
If the HTML DB engine displays regions in multiple columns in the same region position then HTML DB will render an HTML table. This attribute enables you to control the attributes of the <table>
tag.
Use this attribute only when a page template will be designated as an error template. Use #MESSAGE#
to place the error message and #BACK_LINK#
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>
Popup LOV template controls how popup lists display for all items defined as POPUP. You can only specify one popup LOV template for each theme.
This section describes specific sections of the Popup List of Values Template page.
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 which require translation.
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.
Use Popup Icon to specify an icon to display to the right of a form field for items of type POPUP. By default, the HTML DB engine uses a list.gif
image. Use Popup Icon Attr to defines image attributes (such as height and width) for the Popup Icon
Use these attributes to specify how a Search field displays. Table 7-8 describes available Search Field attributes.
Table 7-8 Search Field Attributes
Attribute | Description |
---|---|
Before Field Text |
Defines text to display before the popup list of values search field displays. |
Filter Width |
Display the text field using this width. |
Filter Max Width |
Display the text field widget using this maximum width. |
Filter Text Attribute |
Display the text field using these attributes. This will be included within the HTML input tag. |
After Field Text |
Display this text after displaying the search field, the search button, and the close button. |
Use these attributes to define the button name and attributes for Find, Close, Next, and Previous buttons.
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.
This section describes specific sections of the Region Template page.
Name identifies the name of the template. Use the Translatable check box to indicate that the template contains text strings which 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.
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.
##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 have defined will appear in a select list. Use the following substitution strings to define positions for placement of buttons in a region:
#EDIT#
#CLOSE#
#CREATE#
#EXPAND#
#HELP#
#DELETE#
#COPY#
#NEXT#
#PREVIOUS#
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:
Report Column Template Attributes for Generic Column Templates
Report Column Template Attributes for Named Column Templates
Oracle HTML DB includes two types of report templates:
Generic column templates
Named 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 templates is limited to reports that have a standard row and column structure. Additional style may be applied to a report using this type of template through 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 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 a great deal of 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>
This section describes specific sections of the Report Column Template page for Generic Column Templates.
Template Name identifies the name of the template. Use the Translatable check box to indicate the template contains text strings which require translation. Template Type indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference #COLUMN_VALUE#
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 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.
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 which 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 Column Heading Template to colorize 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, HTML DB engine applies the default column heading template.
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:
Column templates define the look of each column. You can define up to four column templates, each of which can conditional. For example, you can have different background colors for even and odd rows, or highlight rows which 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 7-9.
Table 7-9 Column Template Substitution Strings
Substitution String | Description |
---|---|
|
Determines the column alignment. Specified by the user. |
|
Count of the number of columns. |
|
Defines the current column number. |
|
Defines the column header. |
|
Replaced with the value of the column. |
|
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 format columns based on data in that row.
Use for Even Numbered Rows. Conditionally format even numbered rows.
Use for Odd Numbered Rows. Conditionally format odd numbered row.
If you select Use Based on PL/SQL Expression, the next step is to enter a PL/SQL expression in 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
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>
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.
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.
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 7-12 describes these templates.
Table 7-10 Pagination Subtemplate Attribute
Pagination Subtemplate Attribute | Description |
---|---|
Applies to the entire pagination subtemplate. For example: <span class="instructiontext">#TEXT#</span> You can use the substitution string Use the other Pagination Subtemplate attributes to modify individual items. |
|
Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example: <a href="#LINK#">next</a> |
|
Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example: <a href="#LINK#">previous</a> |
|
Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example: <a href="#LINK#">next set</a> |
|
Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example: <a href="#LINK#">previous set</a> |
This section describes specific sections of the Report Column Template page for Named Column Templates.
Template Name identifies the name of the template. Use the Translatable check box to indicate the template contains text strings which require translation. Template Type indicates the type of template. Named Column templates reference column names in the template. Generic Column Templates reference #COLUMN_VALUE#
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 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 define the look of each column. You can define up to four row templates, each of which can conditional.
In each Row Template, you define the look of each row. Row Templates support the substitution strings described in Table 7-11.
Table 7-11 Row Template Substitution Strings
Substitution String | Description |
---|---|
|
Determines the row alignment. Specified by the user. |
|
Count of the number of columns. |
|
Defines the current column number. |
|
Defines the column header. |
|
Replaced with the value of the column. |
|
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 format columns based on data in that row.
Use for Even Numbered Rows. Conditionally format even numbered rows.
Use for Odd Numbered Rows. Conditionally format odd numbered row.
If you select Use Based on PL/SQL Expression, the next step is to enter a PL/SQL expression in 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
Use this template to colorize 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>
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 which 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.
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.
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 7-12 describes these templates.
Table 7-12 Pagination Subtemplate Attribute
Pagination Subtemplate Attribute | Description |
---|---|
Applies to the entire pagination subtemplate. For example: <span class="instructiontext">#TEXT#</span> You can use the substitution string Use the other Pagination Subtemplate attributes to modify individual items. |
|
Enter HTML to modify how the Next Page portion of the pagination subtemplate appears. For example: <a href="#LINK#">next</a> |
|
Enter HTML to modify how the Previous Page portion of the pagination subtemplate appears. For example: <a href="#LINK#">previous</a> |
|
Enter HTML to modify how the Next Set portion of the pagination subtemplate appears. For example: <a href="#LINK#">next set</a> |
|
Enter HTML to modify how the Previous Set portion of the pagination subtemplate appears. For example: <a href="#LINK#">previous set</a> |
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:
|