Use themes and theme styles to increase your productivity when building an application. Themes are collections of templates that define the layout and style of an application. If a theme includes themes styles, developers can can alter the appearance of an application using the Theme Roller Utility.
Topics:
See Also:
"Managing Themes and Subscriptions" and "Managing Themes and Subscriptions"
Themes are collections of templates that enable you 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 template type and then by template class. Template types include page, region, report, list, button, label, and popup list of values (LOV).
Each template type has a number of template classes. A template class defines the purpose of a template within a template type. For example, a region template can be classified as a form region template, a report region template, and so on. 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. Administrators can add themes to the theme repository as follows:
Workspace Themes - Workspace administrators can create themes that are available to all developers within the workspace. See "Managing Workspace Themes."
Public Themes - Instance administrators can create public themes by adding them to the Oracle Application Express Administration Services. Once added, these public themes are available to all developers across all workspaces in an instance. See "Managing Public Themes" in Oracle Application Express Administration Guide.
Newer themes, such as Universal Theme - 42 and Mobile - 51, include theme styles. A theme style is a CSS style sheet that is added to the base CSS. Developers can change the appearance of an application by altering the theme style using the Theme Roller utility.
See Also:
Responsive design enables you to design web pages so that the layout fits the available space regardless of the device on which page displays (for example, a desktop computer, laptop computer, tablet, or smartphone). By implementing a responsive design, the user gets the full experience on larger screens. On smart phones and tablets, the layout can also adjust to the size of the specific device. During this resizing process, elements shift position, re-size, or become hidden. The goal of responsive design is to present all essential content in a user friendly way for all possible screen sizes. Universal Theme - 42 is an example of a responsive user interface theme.
Keep in mind, that responsive design is not just a matter of picking one set of templates. As the application developer, you are responsible for using the templates in theme and design a page to facilitate a truly responsive design. Converting an existing application to the Universal Theme requires you review all the application pages to ensure you have defined the appropriate template and layout.
Oracle Application Express provides responsive user interface themes that enable you to build applications that can scale to any screen size. Universal Theme - 42 is a responsive Desktop theme. Developers can use this theme to build applications that work well on a variety of different screen sizes.
Mobile Theme - 51 enables you to build applications that are optimized for the use on mobile devices such as smartphones and tablets. Pages built with the Mobile theme are smaller and lighter weight than Desktop pages and provide support for touch-events and orientation-change.
Tip:
See "Utilizing Packaged Applications" to view applications using Universal Theme - 42
Oracle Application Express applications define the position of regions and items on a page using grid settings. Older themes, such as such as Theme 26 - Productivity Applications, use a table-based grid. In table-based themes, regions can be positioned next to each one another and forms can have two or more items in a single row. Newer themes, such a Universal Theme - 42, use a DIV-based grid. Pages using a DIV-based grid offer the following advantages:
Easier to maintain and update. DIV-based pages have less code and therefore less complexity.
Faster loading. Pages using a DIV-based grid generally load faster.
If you switch from a table-based theme to a DIV-based theme, you need to configure the Reset Grid option, Reset fixed region position in the Switch Theme Wizard. Selecting Reset fixed region position removes existing settings and renders all regions and items stacked vertically.
See Also:
Newer themes, such as Universal Theme - 42 and Mobile - 51, include theme styles. A theme style is a CSS that is added to the base CSS. Using the Theme Roller utility, developers can change the appearance of an application.
Topics:
A theme style defines a CSS style sheet that is added to the base CSS to alter the look and feel of an application. Newer themes such as Universal Theme - 42 and Mobile - 51 can have a base CSS file plus the theme style CSS file. The theme style CSS file are referenced in the page template using the #THEME_STYLE_CSS#
substitution string. The Application Express engine replaces this substitution string with the CSS file references defined in the theme style attributes. Use theme styles to customize themes, to switch to a different color scheme, apply a flat look, or make a theme responsive. A theme can have multiple theme styles with one style set as active. You can modify a theme style CSS file using Theme Roller.
Once defined, developers can select a theme style by:
Editing the Theme Styles attribute when running the Create Application Wizard. See "Using the Create Application Wizard."
Editing the User Interface. See "Editing a Theme Style from the User Interface Page."
Accessing the Create/Edit Theme page. See "Editing a Theme" and "Creating a Theme Style."
To edit a Theme Style from the User Interface page:
Developers can enable users to select a theme style in a running application. Once enabled, a Customize link appears in the running application, typically in the lower left corner. When the user clicks the Customize link a pop-up displays listing available theme styles. When a user selects a theme style, the theme style is stored persistently as a user preference and will be retained during future sessions.
To enable users to select a theme style:
Theme Roller is a live CSS editor that enables developers to quickly change the colors, rounded corners and other attributes of their applications without touching a line of code. Theme Roller displays in the Runtime Developer Toolbar if at least one of your theme styles has the Input Parameter File URLs attribute defined.
Tip:
Install and run a packaged application that uses the Universal Theme - 42 to see an example of Theme Roller. See "Utilizing Packaged Applications."
To use Theme Roller:
Template options provide a declarative way for developers to apply different styles to components on an Oracle Application Express page.
Topics:
See Also:
"Using Template Options" and "Using Quick Edit to Modify Live Template Options"
Template options enable developers to declaratively apply CSS modifiers to the templates they have chosen for pages, regions, reports, lists, breadcrumbs, items and buttons. A CSS modifier is a reference to a CSS class defined in a CSS style sheet. CSS modifiers enable a developer to use the same HTML markup but present it in a variety of different styles simply by applying a CSS. Template options reduce the need to have a large number of nearly identical templates defined in a theme in order to achieve different styles for button colors, region widths, font settings, item label markup, and so on.
Examples of how developers can use template options include:
Applying different colors or accents
Applying different spacing and padding
Rendering buttons in different styles, with and without icons
Displaying form fields with different alignments.
Without template options, applying these variations would require a large number of nearly identical templates, or in-depth knowledge of CSS. Components that support template options include: pages; regions; classic reports; breadcrumbs; lists; items and labels; and buttons.
Developers can select template options that are not part of a template option group to be the default for a template. App Builder automatically applies default template options by rendering the component that references the template. Default template options are not written to an actual component. Instead, a #DEFAULT#
substitution string is defined for the component, thus enabling developers to centrally modify the template option defaults.
Developers can choose not to use the template option defaults, which removes the #DEFAULT#
substitution string from the component. If template option defaults are disabled, then developers can selectively apply available template options to a component. All template options that are selected directly when editing the component are written to the component's metadata, represented by their corresponding CSS classes string. At runtime, the selected template options and default template option are part of the default are combined with the component's CSS classes string and applied to the component.
Developers can define the purpose of related template options by creating template option groups. Examples of template option groups include Button Size, Button Style, List Examples, List Style, and Form Label Position. When developers create a template option group, they can specify a template option preset at the template-level. For example, suppose you have a button template that has the template options Large and Small. If you define Small as the preset, then any new button referencing the template would automatically have the template option Small applied to it when is it created. Template options that are part of a group are optional unless a present is defined at the template-level.
You manage themes on the Themes page.
Tip:
You can change the selected default templates for a theme on the Create/Edit Theme page. See "Editing Themes".
To access the Themes page:
This section describes how to edit a theme attributes.
This section describes the attributes on the Create/Edit Theme Attributes page. To learn more about an attribute and view examples, see field-level Help.
Topics:
Table 11-1 describes the attributes under Name.
Table 11-1 Name
Attribute | Description |
---|---|
Identifies the current application ID. See Also: "Editing Application Attributes" |
|
Identifies the number of a theme. A theme is a collection of templates which define the user interface of an application. |
|
Enter a short descriptive name for the theme. |
|
Specifies the user interface for which the theme is designed. See Also: "User Interface Details Page" |
|
Identifies the selected Navigation Type. Valid options include: Tabs or List. See Also: "Creating Tabs" and "Creating Lists" |
|
Identifies the selected Navigation Bar Implementation. Valid options include: Classic or List. See Also: "User Interface Details Page" |
|
Enter a description for the theme. |
Displays themes to which this application subscribes. When an application subscribes to a theme, all theme attributes, subscribed template options, and subscribed templates are set to read-only.
See Also:
Table 11-2 describes the attributes under JavaScript and Cascading Style Sheets.
Table 11-2 JavaScript and Cascading Style Sheets
Attribute | Description |
---|---|
Enter JavaScript file URLs for code to be loaded on every page. Each URL has to be written into a new line. If you provide a minified version of your file, you can use the substitution string To view examples, see field-level Help. |
|
Enter Cascading Style Sheet file URLs to be loaded on every page. Each URL has to be written into a new line. If you provide a minified version of your file you can use the substitution string To view examples, see field-level Help. |
Table 11-3 describes the default templates by component type.
Table 11-3 Component Default Templates
Attribute | Description |
---|---|
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. See Also: "Display Attributes" |
|
Specifies the default navigation bar list template used when you define the navigation bar type as List in your application. If a developer does not explicitly choose a template, then the Application Express engine uses the template specified here. See Also: "Display Attributes" |
|
Specifies the default navigation menu list position. |
|
Specifies the default navigation menu list template used when you create a new list to be displayed on the top of the page. |
|
Specifies the default navigation menu list template used when you create a new list to be displayed on the side of the page. |
|
Specifies 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. |
|
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 wish to use a template designed to display errors. This setting only applies to Normal pages. |
|
Identifies the template to be used when the Application Express engine is in printer friendly mode. When calling the Application Express to render a page, you have the option to identify a printer friendly attribute with values of Yes or No. If you select Yes, then the page displays using a printer friendly template. The Application Express engine displays all text within HTML form fields as text. The printer friendly template does not need to have the |
|
Identifies the default breadcrumb template used when you create a breadcrumb. |
|
Identifies the default button template used when you create a button. |
|
Specifies the default calendar template used when you create a calendar. |
|
Specifies the default label template used when you create new label |
|
Specifies the default optional label template used when you create new label. |
|
Template options allow for selecting a number of CSS customization settings to be applied to the current page template. Template options and their corresponding CSS classes are defined at the page template level. The page template needs to have the substitution string |
|
Specifies the default required label template used when you create new label. |
|
Specifies the default list template used when you create a list. |
|
Specifies the default region template used when you create a region. |
|
Identifies the default region template used when you create a report. |
|
Identifies the default header toolbar region template used when you create a new page that includes a header or footer tool bars. |
|
Identifies the default header toolbar region template used when you create a new page that includes a header or footer tool bars. |
Table 11-4 describes the default templates available under Region Defaults.
Table 11-4 Region Defaults
Attribute | Description |
---|---|
Identifies the default breadcrumb template used when you create a breadcrumb. |
|
Specifies the default chart template used when you create a chart. |
|
Specifies the default form template used when you create a form. |
|
Specifies the default region template used when you create a list. |
|
Specifies the default region template used when you create a report. |
|
Specifies the default region template used when you create a tabular form. |
|
Specifies the default region template used when you create a new wizard component. |
|
Specifies the default region template used when you create an interactive report |
Table 11-5 describes the default templates available under Dialog Defaults.
Table 11-5 Dialog Defaults
Attribute | Description |
---|---|
Specifies the default region template used when you create a content region on a Dialog using the Create Page Wizard and Create Application Wizard. |
|
Specifies the default region template used when you create a button region on a Dialog using the Create Page Wizard and Create Application Wizard. |
|
Specifies the default template for displaying modal or non-modal dialog pages. If a developer does not explicitly choose a template then the Application Express engine uses the template specified here. This template will also be used for errors that display on a separate page as opposed to those that display inline. |
Transition Defaults is only visible for a Mobile theme. Table 11-6 describes attributes available under Transition Defaults.
Global template options are defined at the theme-level and are available for all components of a given type.
See Also:
"Understanding Template Options" and "Managing Global Template Options"
Table 11-7 describes attributes under Icons.
Table 11-7 Icons
Attribute | Description |
---|---|
Select the icon library that is loaded when Oracle Application Express displays a page. The icons within the library are also be listed in the picker for Region and Button Icon CSS Classes, implemented within Page Designer. |
|
Enter Cascading Style Sheet file URLs for custom icons to be loaded on every page. Each URL has to be written into a new line. If you provide a minified version of your file you can use the substitution string To view examples, see field-level Help. |
|
Specify a comma delimited list of CSS class names which is listed in the picker for Region and Button Icon CSS Classes, implemented within Page Designer. |
|
Specify a CSS class that will at runtime prefix the Icon CSS Classes defined for Regions, Buttons and Lists, if they are not using a class of the Icon Library. |
|
Enter the name and location of the image to be used when items of type Date Picker are displayed. For example: #IMAGE_PREFIX#new_cal.bmp |
|
Enter the image attributes for the Calendar Icon. For example: width="16" height="16" alt="Display Calendar" |
Displays theme styles available to the current theme. Theme Styles define the CSS for your application's theme and control the user interface of your application. Theme styles are referenced in the page template using the #THEME_STYLE_CSS#
substitution string. The Theme Style currently used displays a check mark under Is Current.
See Also:
The File Prefix attribute displays the virtual path the Web server uses to point to the files of the theme. Do not specify anything to reference files which are stored with your theme definition in the database. For performance reasons you can also store your theme files on your Web Server. Use #IMAGE_PREFIX#
or any valid URL to reference them under Styles.
See Also:
"Managing Static Application Files" and "Managing Static Workspace Files"