How to change the Oracle ADF look and feel?
Friday, April 04, 2008
Oracle supports skinning i.e. changing the look and feel of the application.
You can develop your own skin e.g. CustomSkin.css
Step 1: Put CustomSkin.css and all dependent resources at the root
of your application e.g. /skins/myskin/CustomSkin.css
Step 2: Register the custom skin
In JDeveloper, right click on the WEB-INF folder of the sample project
and create a new XML document and name it - adf-faces-skins.xml
Replace the generated code with the following:
<skins xmlns="http://xmlns.oracle.com/adf/view/faces/skin">
<skin>
<id>mycompany.desktop</id>
<family>myskin</family>
<render-kit-id>oracle.adf.desktop</render-kit-id>
<style-sheet-name>/skins/myskin/CustomSkin.css</style-sheet-name>
</skin>
</skins>
Save your work.
Step 3: Modify adf-faces-config.xml file to use the custom skin.
Open the adf-faces-config.xml file.
Replace the <skin-family>value with custom skin family name
e.g. <skin-family>myskin</skin-family>
Save your work.
Step 4: Run your application and test.