RichFaces is not defined, RF 4.0
prefec2 Apr 25, 2011 5:06 PMHello
I know, there are other posts with a similar title. however, they seem to be for RF 3.x and not RF 4.0.x. I also search the web, but I couldn't find an valid answer.
My problem is as follows: When using <rich:calendar/> I get a RichFaces is not defined error on the JS console of Firefox. And when looking into the Page Source, I can see that there is JS which uses RichFaces.ui.components.... but I cannot see a definition. So it looks like an <script> section is missing.
My setup is:
- a demo app containing a template with too pages based on it
- Eclipse 3.6.2 with JBoss stuff included, EMF, Glassfish 3, antlr3 etc.
- Java 6 EE
The file in question defines a form with two content elements
<!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:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <ui:composition template="/templates/common.xhtml"> <ui:define name="pageTitle">Greeting to User</ui:define> <ui:define name="pageHeader">Greeting Page</ui:define> <ui:define name="body"> <h:form> <a4j:commandButton action="greeting" value="button"></a4j:commandButton> <rich:calendar popup="false" value="#{User.date}"></rich:calendar> </h:form> #{msgs.greeting} #{user.name}! </ui:define> </ui:composition> </html>
The commandButton is correctly rendered and it works. However the calendar does not work at all due to the missing JS.
The lib folder contains:
common-annotations.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
cssparser-0.9.5.jar
guava-r09.jar
jstl.jar
richfaces-components-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar
sac-1.3.jar
standard.jar
If anyone can point me in the right direction, please? I fiddled around with the web.xml file. But that shouldn't need extra work (as other pages state).
Any help appreciated
Reiner