Richfaces 4 FAQ

By | 2014-06-24

Q: why my eclipse doesn’t support richfaces 4 tag? (auto insert)
A: ensure your Jboss plugin is 3.2 or later, and your eclipse should be support JSF2.
if nth helps, remove the project and reimport.

Q: how to set the project be maven project in eclipse?
A: Right click the project, Configure -> convert to Maven project

Q: which maven plugin should be installed in eclipse?
A: If you are using 3.7, it does come with M2e maven support. But you need to install Jboss Maven integration, for WTP support.
If you are using 3.6, install M2e + JBoss Maven integration

Q: Do i need to add Apache Tomcat in build path dependency?
A: No. Maven will handle that if your pom.xml setup properly

Q: Why my JSF project load twice?
A: Check anything wrong in web.xml.
In my case, it is due to the project name does not match the context path.
It seems tomcat will deploy the content(first run), execute deploied content
Try to set the project name and context path to the same name

Q: Why end-user can access JSF source code (*.xhtml) directly.
A: Native behaviour of JSF Engine.
Add following to force tomcat compile *.xhtml

Faces Servlet
javax.faces.webapp.FacesServlet

Faces Servlet
*.html

Q: Why the richfaces will add style to other html component
A: switch it off.

org.richfaces.enableControlSkinningfalse

Q: In Richfaces AJAX request, why there is a HTTP POST response from server, but assigned Method expression does not execute? (checked using debugger)
A: Please check if any a4j:outputPanel or guard the request.
If there is a a4j:outputPanel render=”false”, server does give a response WITHOUT execute assigned method.
I don’t know this is a bug or what

Q: How do i make use of Richfaces Javascript API?
A: Only the js component retrieved by richfaces can use
e.g. #{rich.component(“popupPanel”).show} / #{rich.clientId(“component client id”)}
check out richfaces js library in doc.

Leave a Reply

Your email address will not be published. Required fields are marked *