Skip to main content

Posts

Showing posts from July, 2010

ADF 11g Skinning: Three ways to change look and feel

On the JDeveloper ADF forum there are many questions on how to change the look and feel of components. In this post I'll explain three ways to do that.

Setting skin Selector property

For this we need to define a custom skin.
<?xml version="1.0" encoding="ISO-8859-1"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<skin>
<id>mySkin.desktop</id>
<family>MySkin</family>
<extends>blafplus-rich.desktop</extends>
<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
<style-sheet-name>skins/MySkin.css</style-sheet-name>
</skin>
</skins>

In the style sheet we will add an entry that will hide the columnheaders.
af|column::column-header-cell{display: none;}

This entry in the styleSheet will apply to ALL columns in your application.


Using and appending styleClasses

Now we create a StyleClass that is exactly the same as the style in the previo…