5-2 Oracle Fusion Middleware Tutorial for Oracle WebCenter Developers
To change the default preferences of your portal application at design time, you will need to directly edit the adf-config.xml file in your project. The steps to
accomplish this task are described in this section, as follows.
To change the default settings for the skin and template:
1.
Open adf-config.xml.
To locate this file in JDeveloper, open the Application Resources part of the Application Navigator. Then, open the Descriptors folder and the ADF
META-INF folder, as shown in
Figure 5–1 .
Figure 5–1 Location of the adf-config.xml File in JDeveloper
2. In the ADF META-INF folder, select the adf-config.xml file and open it. The
file appears in the Overview tab, as shown in
Figure 5–2 .
Figure 5–2 The adf-config.xml file Specifying Component Configuration
3. Now click the Source view tab in the JDeveloper window to view the XML source
contents of the file.
4. In the Search field of the adf-config.xml file, enter the word preferences.
Navigate in the XML schema to this code Example 5–1
:
Changing the Look and Feel of Your Portal Application 5-3
Example 5–1 The XML Code Specifying the Default Page Template
portal:preference id=oracle.webcenter.portalapp.pagetemplate.pageTemplate desc=Default Page Template
value=oraclewebcenterportalapppagetemplatespageTemplate_globe.jspx resourceType=Template display=true
5.
Change the value attribute to myTemplate.jspx and change the desc attribute to My Site Template, as shown in
Example 5–2
Example 5–2 Changed XML Template Code
value=oraclewebcenterportalapppagetemplatesmyTemplate.jspx desc=My Site Template
6.
Navigate in the preference schema to the desc attribute Default Portal Skin
and the value attribute portal, shown in Example 5–3
. Select portal and change it to mycustomskin.
Example 5–3 The Value Attribute of the Default Portal Skin
portal:preference id=oracle.webcenter.portalapp.skin desc=Default Portal Skin value=portal
7. In the Source view of the adf-config.xml file, note that the value attribute is now
updated as mycustomskin, as shown in Figure 5–3
.
Figure 5–3 The Portal Skin Value Attribute Changed to mycustomskin
8.
Change the desc attribute from Default Portal Skin to Tutorial Skin
, shown in Figure 5–4
.
Figure 5–4 The Changed desc Attribute to Tutorial Skin
9. Save the adf-config.xml file.
10. Right-click the Portal project in Application Navigator and select Run to build and