Before You Begin
This 15-minute tutorial shows you how to create a theme to define the look and feel of an Oracle Visual Builder Cloud Service application.
Background
A theme is an HTML fragment, along with one or more related CSS stylesheets and images, into which the content of an Oracle Visual Builder Cloud Service application is injected. Typically the theme defines the look and feel of the application, as well as the header, footer and page menu. You can inject other dynamic content into areas of the theme to display the logo, title, copyright message, language switcher, and menu structure defined by the application developer.
You can apply the theme you create to the application in which you create it. You can also share it and make it available to other applications. Finally, you can publish the application as a template so that other applications can use it.
The images in this tutorial show the standalone version of Oracle Visual Builder Cloud Service. If you are using the Oracle Integration Cloud version, you will see an additional menu at the top of each page that lets you switch between Visual Builder and Integration Cloud.

What Do You Need?
- Access to Oracle Visual Builder Cloud Service
- A supported browser (see Known Issues for Oracle Visual Builder Cloud Service for more information)
- A thorough knowledge of JavaScript and web application development
Create
a Simple Application
- In the web browser, log in to Oracle Visual Builder Cloud Service.
- On the Home page, click + New Application
and select Web.
Description of the illustration vbcsct_t1_s2.png - On the first page of the Create Application wizard, enter
the following:
- Application Name:
Theme Application
- Description:
Theme tutorial application
The Application ID text field is automatically populated based on the Application Name.
Description of the illustration vbcsct_t1_s3.png Click Next.
- Application Name:
- On the next page, select the Oracle Applications
Cloud UI template, and then click Next.
Description of the illustration vbcsct_t1_s4.png - On the last page, click Finish.
By default, one tab with
Home
as its label is available.Description of the illustration vbcsct_t1_s5.png - Your application is created and opens in the Page Designer.
Click the Themes palette to view the
currently available themes. Three themes are provided by
default: Oracle Alta UI, Oracle Applications Cloud UI, and
Oracle Applications Cloud UI R12.
Description of the illustration vbcsct_t1_s6.png
Create
a Theme
- Click the
icon and select Application Settings.
Description of the illustration vbcsct_t2_s1.png - Click the Extensions tile.
Description of the illustration vbcsct_t2_s2.png - On the Extensions page, click the Theme
tab.
Description of the illustration vbcsct_t2_s3.png - Click + New Theme and select Create
new.
Description of the illustration vbcsct_t2_s4.png - On the first page of the Create New Extension wizard, enter
the following, then click Template.
- Display Name:
MyTheme
- Extension ID:
com.example.MyTheme
(at least two groups of letters or numbers separated by a period) - AMD Package Name:
com.example.MyTheme
(automatically populated) - Description:
My example theme
Description of the illustration vbcsct_t2_s5.png - Display Name:
- On the Available Templates page of the wizard, select Simple
Theme, then click OK.
Description of the illustration vbcsct_t2_s6.png - The Overview tab of the theme opens. Toggle the Extension
Active icon to enable the theme. A message reports
that the extension has been enabled.
Description of the illustration vbcsct_t2_s7.png - Click Sources to open the files in the
Resource Browser.
Description of the illustration vbcsct_t2_s8.png - If necessary, expand the nodes in the Resource Browser and
view the file names (you may need to widen your web browser
window to see them).
Description of the illustration vbcsct_t2_s9.png You can perform most simple theme customizations by modifying two of the files,
layout.html
(the HTML source of the theme) andstyle.css
(the associated CSS file). You'll make these modifications in the next section.For more information on the files that make up a theme, see Using Oracle Visual Builder Cloud Service.
- Click the Main Menu
icon and select Page Designer to return to the Page Designer.
Description of the illustration vbcsct_t2_s10.png - Click the Themes palette. Scroll down to
see the new theme,
MyTheme
, in the palette. It has a default icon.Description of the illustration vbcsct_t2_s11.png - Click the Main Menu
icon and select Application Settings, then Extensions, to return to the Themes tab on the Extensions page.
Description of the illustration vbcsct_t2_s12.png
Customize
the Theme Layout
In this section, you'll customize the layout of your new theme.
You'll modify layout.html
to add a new help panel
that floats to the side of the main content window.
The Sources tab provides a basic editor. If you want to do more
extensive editing, you can export the extension to your system
as a ZIP file, edit the files in a local editor, and then use
the Resource Browser under Application Settings to import the
zip file to the extensions
directory. You could
also select and copy the contents of an individual file, edit it
in a local editor, and then paste it back into the Sources tab
editor.
- From the Overview page for
MyTheme
, click the Sources tab.Description of the illustration vbcsct_t3_s1.png - In the Resource Browser, expand the nodes (if necessary) and
navigate through the directory hierarchy to find the
layout.html
file, underuser/extensions/com.example.MyTheme/theme/
.Description of the illustration vbcsct_t3_s2.png - Click the
layout.html
file to display its contents.Description of the illustration vbcsct_t3_s3.png - Select the
div
element with the ID value"abcs-app-content"
. It's almost at the end of the file, between the header and the footer.<div id="abcs-app-content"> <!-- page content placeholder --> </div>
Description of the illustration vbcsct_t3_s4.png - Replace that code with the following, which moves it under a
higher-level
div
element with the ID value"my-layout-container"
. Don't worry about the formatting.<div id="my-layout-container"> <div id="abcs-app-content"> <!-- page content placeholder --> </div> <div class="help-panel"> Help! This is where you could add basic information on how to use the application. </div> </div>
Description of the illustration vbcsct_t3_s5.png - Click Save Changes.
Description of the illustration vbcsct_t3_s6.png
Customize
the Theme Style
In this section, you'll customize the style of your new theme.
You'll modify style.css
to change the color scheme
and add some styling to the help panel.
- Click the file
style.css
, in the same directory aslayout.html
, to display its contents.Description of the illustration vbcsct_t4_s1.png - Locate the following section, at lines 27-28.
.abcs-bg-container { background-color: #F0F0F0; }
- Replace the background color setting with the following to
change the background color to yellow.
.abcs-bg-container { background-color: #fcde8a; }
Description of the illustration vbcsct_t4_s3.png - To style the new help panel, add the following at the start
of the file.
.help-panel { width: 25%; background-color: #fbce4a; border-radius: 5px; padding: 10px 10px 10px 10px; margin-right: 10px; margin-top: 3px; } #my-layout-container { display: flex; }
Description of the illustration vbcsct_t4_s4.png - Finally, make the main application content narrower to fit
in the help panel. Find the section for
#abcs-app-content
(line 261) and add a line that sets the width to75%
.#abcs-app-content { width: 75%; margin-bottom: 10px; padding: 0px 10px 10px 10px; -webkit-flex-grow: 1; -ms-flex-positive: 1; flex-grow: 1; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; }
Description of the illustration vbcsct_t4_s5.png - Click Save Changes, then click Reload
Extensions.
Description of the illustration vbcsct_t4_s6.png - Click the Main Menu
icon and select Page Designer to return to the Page Designer.
Description of the illustration vbcsct_t4_s7.png - Click the Themes palette and select MyTheme.
Description of the illustration vbcsct_t4_s8.png The application is re-rendered with the new layout. You may need to refresh the browser to see the help panel.
Description of the illustration vbcsct_t4_s8_result.png The new help panel you created is not part of the content area of the application, but only part of the wrapper around the content area. In the Page Designer, you can drag components only into the content area specified by the ID
"abcs-app-content"
. To add content to the help panel, you would have to edit the theme in the Extensions page, modifying the contents of thediv
element that has the ID"help-menu"
.
Want
to Learn More?
- Using Oracle Visual Builder Cloud Service in the Oracle Help Center
- Known Issues for Oracle Visual Builder Cloud Service in the Oracle Help Center
- JavaScript API for Oracle Visual Builder Cloud Service in the Oracle Help Center