| Author |
Richfaces skins
|
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
Richfaces skins not applied to the base jsf components like CommandButton and CommandLink?
I tried to set the Control Skinning param in the Web.xml, but the effect of that is not appearing the output page
Can anyone help me how to overcome this problem
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
Did you set this context param:
|
Blog: http://mkblog.exadel.com
HTML Prototypes: http://gotiggr.com
|
 |
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
I had set that in the Web.xml file, but still the jsf components like h:commandButton and h:commandLink is not rendered with the richfaces skins
What might be the problem other than this?
Thanks in advance
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
What RichFaces version do you use and what skin? What if you place h:inputText - is that skinned?
|
 |
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
The web.xml file contains
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>#{SkinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
<!--Configuration for Richfaces-->
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<!--End of the configuration part for Richfaces-->
</web-app>
and the Version i have used is
richfaces-api-3.1.4.GA.jar
richfaces-impl-3.1.4.GA.jar
richfaces-ui-3.1.4.GA.jar
Those jsf components are rendered like the normal components, but the richfaces skins are not used
and i used the bluesky skinning
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
I don't think skinning standard controls is available in RichFaces version 3.1.4. You need to try RichFaces 3.3.x
|
 |
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
|
Can you provide the configurations for the Richfaces newer version?
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/GettingStarted.html#AddingRichFaceslibrariesintotheproject
|
 |
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
I have followed that site, but while adding the newer version of Richraces.
When accessing the page index.jsf, it is throwing some sort of exception. I got this exception while using the richfaces 3.3.2.SR1
Exception:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
root cause
java.lang.NoSuchMethodError: javax.faces.component.UIViewRoot.addPhaseListener(Ljavax/faces/event/PhaseListener;)V
org.ajax4jsf.application.AjaxViewHandler.createView(AjaxViewHandler.java:94)
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:164)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
|
 |
Dinesh Th
Greenhorn
Joined: Jan 20, 2011
Posts: 6
|
|
If necessary, i will send the complete code which i had done
|
 |
Krishnakumar Ramanathan
Greenhorn
Joined: Aug 04, 2008
Posts: 6
|
|
Hi Dinesh,
Click here to find a solution
if you have any trouble in applying it in your app please feel free to contact me - krishna.etr@gmail.com
Krishna
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
You are probably still using an older library version. Make sure you update all Jars to the latest version required to run 3.3 and remove any old Jars.
|
 |
sreekanth aleddulla
Greenhorn
Joined: Feb 08, 2011
Posts: 27
|
|
hi
if you are using richfaces 3.3.3
you need to add the following jars and context-param like below then you can enable the richfaces skins
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-impl-jsf2-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>classic</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
|
 |
sreekanth aleddulla
Greenhorn
Joined: Feb 08, 2011
Posts: 27
|
|
hi
if you are using richfaces 3.3.3
you need to add the following jars and context-param like below then you can enable the richfaces skins
richfaces-api-3.3.3.Final.jar
richfaces-impl-3.3.3.Final.jar
richfaces-impl-jsf2-3.3.3.Final.jar
richfaces-ui-3.3.3.Final.jar
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{skinBean.skin}</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>classic</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
|
 |
 |
|
|
subject: Richfaces skins
|
|
|