Importing a theme

The themes that come with APEX offer enough different styles and layouts to give your application a unique and satisfying look. However, if your application must conform to a specific corporate layout or your application must look the same as another APEX application you can import a theme. APEX offers an easy way to import and use a theme. You can find several themes (free or commercial) on the Internet.

Getting ready

Make sure you have already downloaded the theme and put it on your filesystem.

How to do it...

  1. In the application builder, go to the application you are working on.
  2. Click the Export/Import button.

    Select Import. In the next step, enter the name and path of the theme. You can also use the find button to locate the file. An APEX import or export theme file is just a .sql file. You can even view the contents of the file. It should begin with something like this:

    How to do it...
  3. In the file type radio group, select Theme Export. Optionally, you can select the file character set but most of the time Unicode UTF-8 is sufficient. Click Next. The file will be imported.
  4. If the file has been successfully imported, you get a successful message. This does not mean that you can use it already. The theme has to be installed first. Click Next to install now.
  5. In the next step, you can click on the Install into application list box to select the application where it has to be installed. Click on the Install theme button.
  6. After successfully installing the theme, you will see the other installed themes. The active theme is marked with an asterisk (*). If you want to make the newly installed theme the current one, click on the Switch theme button in the upper-right corner.
  7. In the switch to theme list box, select the desired theme. Click Next.
  8. In the next step you get an overview of the templates and the status of the templates. If there is any problem check the templates and the classes. If everything is ok, click the Next button.
  9. In the last step, click Switch theme to confirm. You can now run your application to see what it looks like.

How it works...

A theme consists of templates. There are nine different types of templates:

  1. Breadcrumb
  2. Button
  3. Calendar
  4. Label
  5. List
  6. Page
  7. Popup lov
  8. Region
  9. Report

In the template you can edit the contents. You can make more templates of a certain type. For example, you can make two templates of type label. However, only one can be set as default for use in an application. Up till APEX 3.2, APEX makes use of an HTML table with the<td>, </td>, <tr> and the</tr> tags. As from version 4.0, APEX also uses div-based templates. It will load pages faster with better accessibility.

In a template you see substitution strings, keywords between pound signs (#), which Oracle replaces on rendering. Examples of substitution strings are title, user, and error message. The substitution strings appear in the form of:

#SUBSTITUTION STRING#

So with the pound signs at the beginning and the end of the string and in uppercase. For example the substitution string #TITLE# will be replaced with the title of the page, and #REGION_POSITION_02# will be replaced by the contents of the region where the display point (you can find it under the user interface section on the region definition) is set to region position 2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.27.251