Foros de discusión

Rich:Calendar not working

Christophe Noel, modificado hace 11 años.

Rich:Calendar not working

Junior Member Mensajes: 99 Fecha de incorporación: 28/09/12 Mensajes recientes
Hello,

I have created a new Liferay IDE (1.6) Project (using JSF 2.1.3-b02 + Richfaces 4.2.0 + Liferay Faces Bridge 3.1.0-rc2 + Facelet 2.0).
Creating the template works fine, but, if I had a <rich:Calendar>, it doesn't respond when the portlet is added in liferay portal (i.e. the calendar is not displayed when the button is clicked).

The Javascript error is: "RichFaces.ui.Calendar is undefined".

My project is exactly the HelloWorld template created + the rich:calendar element.
Shouldn't I add anything in my portlet.xml to use richfaces ?

Do you have any suggestion ?

Thank you for your support.
Christophe Noel, modificado hace 11 años.

RE: Rich:Calendar not working

Junior Member Mensajes: 99 Fecha de incorporación: 28/09/12 Mensajes recientes
Hello,

I fixed the problem by adding the following lines to the web.xml :

<context-param>
		<param-name>org.richfaces.resourceMapping.enabled</param-name>
		<param-value>true</param-value>
	</context-param>
	<servlet>
		<servlet-name>Resource Servlet</servlet-name>
		<servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>Resource Servlet</servlet-name>
		<url-pattern>/org.richfaces.resources/*</url-pattern>
	</servlet-mapping>
	<servlet></servlet>


Is it normal ?