Search code examples
jsf-2richfacescustomizationskin

How to customize SKIN in Richfaces?


I want to customize whole look and feel of my web application. Currently I am using Richfaces 4.1.0.

1st Trial:

To customize the SKIN I tried to follow http://www.packtpub.com/article/skin-customization-in-jboss-richfaces-3.3

  1. Added mySkin properties file.
  2. Updated build.xml
  3. Updated web.xml.

But All this is not fruitful. I am not able to customize the SKIN.

2nd Trial:

Ref Link:- http://docs.jboss.org/richfaces/latest_4_1_X/Developer_Guide/en-US/html/chap-Developer_Guide-Skinning_and_theming.html

<context-param> <param-name>org.richfaces.skin</param-name> 
<param-value>emeraldTown</param-value> </context-param>

But this is also not working. To get it working am I required to add any additional RESOURCE?

3rd Trial:

<rich:tabPanel switchType="client" style="width: 70%;margin: auto;background-color:red;">
            
                <rich:tab header="Overview">
                    Tab 1 Content
                </rich:tab>
                <rich:tab header="JSF 2 and RichFaces 4">
                    Tab 2 Content
                </rich:tab>
            
        </rich:tabPanel>

I tried to put background color Explicitly, but even this is failing.


Solution

  • I tried few Different things, but for

    1st Trial &

    2nd Trial

    I found the solution.

     <mime-mapping>
                <extension>ecss</extension>
                <mime-type>text/css</mime-type>
            </mime-mapping>
    

    was missing in web.xml, on adding the above line, I started to get expected results.