RichFaces 4.0 skin not working
I'm testing a simple program to show the skin color using richfaces 4.0 but it is not working.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>RichFa开发者_运维百科ces Greeter</title>
</h:head>
<h:body>
<f:view>
<h:form>
<rich:panel style="width:60%">
<rich:tabPanel switchType="ajax" width="70%" headerAlignment="left" style="background-color:#B5CEFD;width:100%">
<rich:tab label="Profile" name="Profile">Profile Content</rich:tab>
<rich:tab label="Enquiry" name="Enquiry">
<rich:tabPanel width="70%" headerAlignment="left">
<rich:tab label="Valuation" name="Portfolio Valuation">Portfolio Valuation</rich:tab>
<rich:tab label="Transactions" name="Transactions">Transactions</rich:tab>
<rich:tab label="Ror" name="Rate of Return">Rate of Return</rich:tab>
</rich:tabPanel>
</rich:tab>
<rich:tab label="LdapMgmt" name="LdapMgmt">Ldap User Management</rich:tab>
<rich:tab label="AccessMgmt" name="AccessMgmt">Account Access Management</rich:tab>
</rich:tabPanel>
</rich:panel>
</h:form>
</f:view>
</h:body>
</html>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
These are the libraries:
1. jsf-api.jar (mojara2-0-4) 2. jsf-impl.jar (mojara2-0-4) 3. richfaces-core-api-4.0.0.Final.jar 4. richfaces-core-impl-4.0.0.Final.jar 5. richfaces-components-api-4.0.0.Final.jar 6. richfaces-components-ui-4.0.0.Final.jarTomcat7.0
Any advice is much appreciated
The context parameter is: org.richfaces.skin
This might be your solution :
RichFaces 4 Requirement
modifying skins in richfaces is a nightmare in general, Max Katz is right about the parameter:
changing org.richfaces.SKIN to org.richfaces.skin should help
also you can see other parameters at:
http://docs.jboss.org/richfaces/latest_4_1_X/javadoc/richfaces-core-impl/org/richfaces/application/CoreConfiguration.Items.html
Here's what finally made it work for me:
put the .properties file to: /WebContent/WEB-INF/classes/META-INF/skins/
as explained in:
https://community.jboss.org/thread/162295
**First Download blueSky.jar file and put in lib folder.
add this containt in web.xml**
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
精彩评论