Reputation: 337
I am using Richface 3.3.3 Final and JSF 1.2. I have a custom style sheet (will be included in my WAR) which doesn't affect the rich elements that I use on a page, and it is how it is supposed to work - rich styling is closer. BUT I need to "skip" the rich styling somehow: overriding rich styling is just so much pain. Does anybody know of a "switch" that would just turn the rich styling off?
Upvotes: 2
Views: 2501
Reputation: 371
According to RichFaces Documentation you should add:
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>plain</param-value>
</context-param>
To your web.xml. Skin "plain" contains no skin parameters and is intended for embedding RichFaces components into existing projects with their own styles.
Upvotes: 2
Reputation: 1930
Even the plain skin, include several css classes. What i have done is to define a custom skin such as
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>myskin</param-value>
</context-param>
and include an empty file myskin.skin.properties in classpath
Upvotes: 1
Reputation: 7395
I don't think you could turn off styling. However you can use the the "plain" skin to avoid some styling.
Add this to your web.xml
<param-name>org.richfaces.SKIN</param-name>
<param-value>plain</param-value>
</context-param>
However changing the skin affects to all your pages. However if you don't want to apply this to all the pages you should conditionally set the skin
according to a bean property as below.
<param-name>org.richfaces.SKIN</param-name>
<param-value>#{myBean.skinName}</param-value>
</context-param>
Upvotes: 0
Reputation: 3186
I really doubt if you can "turn off" the default Rich faces style classes. I have faced this problem and based on my experience am putting forth this solution.
If you are trying to refer your custom style sheet which is external to your WAR
(I mean if its placed in a web server instead of placing it in your war file), try putting it in your xhtml page.
Also, if you are importing you custom css files from your custom folder inside your war, try putting css classes inside your xhtml page.
Below is the sample code. As I said, am answering this based on my experience after facing the same problem.
In your xhtml page,
<style type="text/css">
.rich-stglpanel-body {
background-color: #FFFFFF;
border: 1px solid #73C5E3;
font-family: Tahoma,Arial,Geneva,sans-serif;
font-size: 11px;
width: 877px;
}
</style>
Upvotes: 0