12.2 Managing Themes and Subscriptions

Developers can manage themes directly or through the use of theme subscriptions.

12.2.1 Understanding Theme Subscriptions

Developers can manage themes using of theme subscriptions.

12.2.1.1 About Theme Subscriptions

Subscribing to a master theme enables the theme to be upgraded during future Oracle Application Express releases.

Developers subscribe to a theme when:

  • Running the Create Application Wizard.

    When a developer runs the Create Application Wizard and selects a built-in theme, the theme is automatically subscribed to a master theme. As an alternative to using a built-in theme, the Create Application Wizard provides the option to copy a theme from an existing application. When copying a theme from an existing applications, developers can choose if they wish to have this theme be subscribed to. See "Understanding Page Types, Features, and Settings."

  • Creating a new theme from the Theme repository.

    When you create a new theme the associated application automatically subscribes to it. See "Creating a Theme."

Once an application subscribes to a master theme only the default templates can be changed. All theme attributes, subscribed template options, and subscribed templates are set to read-only. In other words, only the default templates can be changed. The advantage of subscribing to a master theme is that the theme can be upgraded during future Oracle Application Express releases. When a theme is subscribed to, developers cannot modify the theme or template metadata when they access it from the theme or template edit pages.

12.2.1.2 About Modifying a Theme Subscription

To modify a template without breaking a subscription to the master theme, a developer can create a local copy of the template in their workspace. Local template copies are not subscribed to and are therefore editable. You can take the same approach with theme styles. You can create a local copy of a theme style and then add it to a subscribed theme. Theme styles created locally are editable but will be excluded from theme refreshes.

See Also:

"Copying a Theme"

12.2.1.3 Verifying if a Theme Refresh Is Needed

The Verify Theme Subscription Wizard reviews all theme attributes, templates, and template options in the subscribing theme and raises errors for those that are not in sync with the master theme. The wizard also highlights any templates that are defined in the master theme but not yet published to the subscribing theme.

To run the Verify Theme Subscription Wizard:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Shared Components.
  4. Under User Interface, select Themes.

    The Themes page appears.

  5. On the Themes page, click the View Report icon.
    The Themes page appears as a report. A check mark in the Is Current column indicates which theme is selected.
  6. Select the theme.

    The Create/Edit Theme page appears.

  7. Locate Theme Subscription and click Verify.
  8. Follow the on-screen instructions.

    To publish changes from the master theme to the subscribing theme, click Refresh at the end of the wizard.

12.2.1.4 Refreshing a Subscribed Theme

To refresh a subscribed theme:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Shared Components.
  4. Under User Interface, select Themes.

    The Themes page appears.

  5. On the Themes page, click the View Report icon.
    The Themes page appears as a report. A check mark in the Is Current column indicates which theme is selected.
  6. Select the theme.

    The Create/Edit Theme page appears.

  7. Locate Theme Subscription and click Refresh Theme.

    Tip:

    If the theme is not subscribed, the Refresh Theme button does not appear. See "Re-subscribing to a Built-in Theme."

  8. Click Apply Changes.

12.2.1.5 Unsubscribing to a Theme

Note:

Unsubscribing to a theme prevents future theme updates. Be aware that re-subscribing to a theme is multiple step process that involves copying and switching themes. To learn more, see "Re-subscribing to a Built-in Theme."

Unsubscribing a theme also removes the subscription from all templates, styles, files and so on that are part of the theme.

To unsubscribe to a theme:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Shared Components.
  4. Under User Interface, select Themes.

    The Themes page appears.

  5. On the Themes page, click the View Report icon.
    The Themes page appears as a report. A check mark in the Is Current column indicates which theme is selected.
  6. Select the theme.

    The Create/Edit Theme page appears.

  7. Locate Theme Subscription and click Unsubscribe.

    A warning dialog displays.

  8. Click Unsubscribe Theme.

12.2.1.6 Re-subscribing to a Built-in Theme

If a theme is currently unsubscribed, you can return to a subscribed version of this theme.

To re-subscribe to a theme.

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. From the Tasks list, select Change Identification Number and change the theme to a new identification number. See "Changing a Theme Identification Number."
  3. Run the Create Theme Wizard and create the theme again. See "Creating a Theme."
  4. Switch the current application to the use the new theme. See "Switching Themes."
  5. Delete the original theme from which you created a new identification number. See "Deleting a Theme."

12.2.2 Creating a Theme

Only themes currently associated with an application display on the Themes page. To access other themes, you must run the Create Theme Wizard. Once you create a theme, you can access it on the Themes page. You can create a theme from scratch or select an existing theme from the repository.

Tip:

When you create a new theme, the associated application automatically subscribes to it. See "Managing Themes and Subscriptions."

To create a theme:

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Create.
  3. Select a creation method:
    • From the Repository - View and select a theme from the repository.

    • As a copy from another application - Select the application and then the theme.

    • From Scratch - Create a theme from scratch.

    • From Export - Create a theme to import from the export repository.

  4. Follow the on-screen instructions.

    To learn more about an attribute, see field-level Help.

See Also:

"Editing Themes"

12.2.3 Switching Themes

This section describes how to change the active theme for an application.

12.2.3.1 About Switching the Active Theme

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

When switching an active theme, remember:

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

  • If the wizard locates multiple matches (that is, when several templates share the same template type and templates class), the wizard defaults to a template matching type, class, and name. If no match is found, you must select another template with the same type and class.

  • If no matching template is found (that is, no template with the same type and class exists) then you are prompted to select a template with the same type but with a different class. Then, a warning displays explaining this issue might lead to problems with page functionality, or issues with the page display.When no template of the same template type exists, then the theme cannot be switched. You are blocked from switching themes.

12.2.3.2 Switching an Active Theme

Tip:

To complete this procedure, you must have at least two themes installed. If you do not have at least two themes installed, on the Themes page click Create Theme. You can create a theme from scratch or simply select an existing theme from the repository. See "Creating a Theme."

To switch an active theme:

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Switch Theme.
    The Switch Theme page appears.
  3. For Identify Theme:
    1. Currently Active Theme - Select the current theme for the application. A theme identifies a collection of templates which define the look and feel of the application.
    2. Switch to Theme - Select the new theme for the application.
    3. Click Next.
    The Verify Compatibility page appears.
  4. Review the Status column to identify problematic mappings:
    • A check indicates the mapping was successful.
    • A 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.
    • An error indicates that App Builder was unable to map the class among the themes. Ensure that a class is identified for the templates in both themes.

    Note:

    Failure to resolve warnings may result in a loss of functionality and applications that do not display well.

  5. Click Next to continue.
  6. Click Switch Theme.

12.2.4 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. On the Tasks list, click Change Identification Number.
  3. For Theme Number:
    1. Identify Theme - Select a theme.
    2. New Theme Identification Number - Specify an identification number.
    3. Click Next.
  4. Confirm your changes and click Change Theme ID.

12.2.5 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. On the Tasks list, click Copy Theme.
  3. For Theme Number:
    1. Application - Identifies the current application.
    2. Copy From Theme - Select the theme you want to copy.
    3. Copy to this Theme ID - Enter a new ID for the theme.
    4. Subscribe Theme - Select Yes or No.
    5. Click Next.
  4. Confirm your changes and click Copy Theme.

12.2.6 Deleting a Theme

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

Tip:

Themes are tied to an application. If you modify a theme, those changes only apply to the application being edited. If you delete a theme, any template modifications are lost. To keep template modifications, you must export the theme. See "Exporting Themes."

To delete a theme:

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. On the Tasks list, click Delete Theme.
  3. From Delete Theme, select the theme you want to delete and click Next.
  4. Click Delete Theme.

12.2.7 Creating a Master Theme Application

Developers can create a master theme application. As a best practice, Oracle recommends starting with an existing packaged application that uses Universal Theme - 42 (for example, Sample Database Application).

12.2.7.1 Creating a Master Theme Application by Creating a New Application

To create a master theme application by creating a new application:

  1. Create a new application by running the Create Application Wizard:
    1. On the Workspace home page, click the App Builder icon.
    2. Click the Create button.
  2. Select Copy an existing application and select an application that uses Universal Theme - 42 (for example, Sample Database Application).
  3. Follow the on-screen instructions.

12.2.7.2 Creating a Master Theme Application from an Existing Application

To create a master theme application from an existing application:

  1. Copy the theme from an application that uses Universal Theme - 42 (for example, Sample Database Application) and subscribe to it. See "Copying a Theme."
  2. Switch to the new theme. See "Switching Themes."
  3. Follow the on-screen instructions.

12.2.8 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.

See Also:

"Managing Public Themes" in Oracle Application Express Administration Guide

12.2.8.1 Adding a Workspace 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. On the Tasks list, click Manage Workspace Themes.
  3. Select Create Workspace Theme and click Next.

    Tip:

    If no workspace themes exist, the wizard selects Create for you.

  4. For Create Workspace Theme:
    1. Application - Select the application.
    2. Application Theme to Copy - Select the theme to copy to the workspace theme repository.
    3. Subscribe Theme - Select whether to subscribe the workspace theme to the selected application theme. This option enables you to refresh the workspace theme with changes made to the selected application theme.
    4. Click Next.

    1. Theme Number - Enter a number with a value greater than 100. This number uniquely identifies this theme within a workspace.
    2. Theme Name - Enter a theme name. This name can be the same or different from the application theme name.
    3. Description - Enter a description of the theme.
    4. Click Next.
  5. Click Create Workspace Theme.

12.2.8.2 Viewing an Existing Workspace Theme

To view an existing workspace theme:

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

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

    The Workspace Themes page appears.

    Tip:

    You cannot edit a workspace theme directly. To modify a workspace theme, you must create an application using the theme, modify it, and then manually add it to the workspace theme repository. See "Modifying a Workspace Theme."

12.2.8.3 Deleting a Workspace Theme

To delete a workspace theme:

  1. Navigate to the Themes page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

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

    The Workspace Themes page appears.

  3. Select the theme name.
  4. Click Delete.
  5. Confirm your delete request and click OK.

12.2.8.4 Modifying a Workspace Theme

You cannot edit a workspace theme directly. To modify a workspace theme, you must create an application using the theme, modify it, and then manually add it to the workspace theme repository.

To modify a workspace theme:

  1. Create an application using the theme you want to modify. See "Creating Database Applications."
  2. Modify the theme. See "Editing Themes."
  3. Delete the existing workspace theme. See "Deleting a Workspace Theme."
  4. Add the modified theme to the workspace theme repository. See "Adding a Workspace Theme to the Theme Repository."

12.2.8.5 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. See "Creating Database Applications."
  2. Export the application. See "Exporting an Application."
  3. Import the exported file into the target Oracle Application Express instance. See "Importing an Application, Page or Component Export."
  4. Install the exported file from the Export Repository. See "Installing Export Files."

12.2.9 Managing Instance Themes

Instance administrators manage the theme repository for an entire Oracle Application Express instance. Only an Instance administrators can add or delete a theme from the repository.

See Also:

"Managing Public Themes" in Oracle Application Express Administration Guide

12.2.10 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. See "Creating Database Applications."
  2. Export the theme. 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."

12.2.11 Viewing Theme Reports

Access the following reports to better manage themes and templates.

12.2.11.1 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Reports.
  3. On the Theme Reports page:
    1. Report - Select Application Templates.
    2. Theme - Select either 42. Universal Theme or All Themes.
    3. Click Go.
    A list of templates appears with the template type, template name, theme, and template class.
  4. To edit a template, select the template name.

12.2.11.2 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Reports.
  3. On the Theme Reports page:
    1. Report - Select Theme Template Counts.
    2. Theme - Select a theme or select All.
    3. Click Go.

12.2.11.3 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Reports.
  3. On the Theme Reports page:
    1. Report - Select File References.
    2. Theme - Select a theme or select All.
    3. Click Go.
  4. On the File References page:
    1. Show - Select the type of component to include in the report. If you do not make a selection, no results are returned.

    2. 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.

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

    3. 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.

12.2.11.4 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Reports.
  3. On the Theme Reports page:
    1. Report - Select Class References.
    2. Theme - Select a theme or select All.
    3. Click Go.
  4. On the Class References page:
    1. Show - Select the components to check for a class reference. If you do not make a selection, no results are returned.

    2. 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.

12.2.11.5 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 App Builder icon.
    2. Select an application.
    3. Click Shared Components.
    4. Under User Interface, select Themes.

    The Themes page appears.

  2. Click Reports.
  3. On the Theme Reports page:
    1. Report - Select Template Substitution Strings.
    2. Theme - Select which themes to include in the report.
    3. Click Go.
  4. To link to a template definition, select the component name.