Foros de discusión

Primefaces Liferay 6.2 EE

N. H., modificado hace 9 años.

Primefaces Liferay 6.2 EE

Junior Member Mensajes: 71 Fecha de incorporación: 14/11/13 Mensajes recientes
Hello Together,
I hope you can help me. I have develop a primeface Portlet. With the primeface DataTable everything works fine, but when I try to use another component for example pickList oder carousel from primefaces the css styles are missing or destroyed.


I have:
Liferay EE 6.2 SP 5
Websphere Server 8.0
Primefaces 5.1 jar
Liferay Faces 3.2.4-ga5 (Ephesus / Feb 15, 2014 AD)
JSF Mojarra 2.1.28

I have includes the jar Files
liferay-faces-alloy.jar
liferay-faces-bridge-api.jar
liferay-faces-bridge-impl.jar
liferay-faces-portal.jar
primefaces-5.1.jar
util-bridges.jar
util-java.jar
util-taglib.jar
My faces-config.xml look like this

<!--?xml version="1.0" encoding="UTF-8"?-->
<web-app id="WebApp_ID" version="3.0" 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_3_0.xsd">
	<display-name>TestPortletPrime</display-name>
	<context-param>
		<param-name>javax.faces.PROJECT_STAGE</param-name>
		<param-value>Development</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>/faces/*</url-pattern>
  </servlet-mapping>
	
	
	<context-param>
		<param-name>com.ibm.websphere.portletcontainer.PortletDeploymentEnabled</param-name>
		<param-value>false</param-value>
	</context-param>
	
	<filter>
		<filter-name>Invoker Filter - ERROR</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>ERROR</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - FORWARD</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>FORWARD</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - INCLUDE</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>INCLUDE</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - REQUEST</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>REQUEST</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>Invoker Filter - ERROR</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - FORWARD</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - INCLUDE</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - REQUEST</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
	</filter-mapping>
	

	<listener>
		<listener-class>com.liferay.portal.kernel.servlet.PluginContextListener</listener-class>
	</listener>
	<listener>
		<listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>TestPortletPrime Servlet</servlet-name>
		<servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
		<init-param>
			<param-name>portlet-class</param-name>
			<param-value>javax.portlet.faces.GenericFacesPortlet</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>Dynamic Resource Servlet</servlet-name>
		<servlet-class>com.liferay.portal.kernel.servlet.PortalClassLoaderServlet</servlet-class>
		<init-param>
			<param-name>servlet-class</param-name>
			<param-value>com.liferay.portal.webserver.DynamicResourceServlet</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>TestPortletPrime Servlet</servlet-name>
		<url-pattern>/TestPortletPrime/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Dynamic Resource Servlet</servlet-name>
		<url-pattern>/sprite/*</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
	<jsp-config>
		<taglib>
			<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
			<taglib-location>/WEB-INF/tld/aui.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/portlet</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-portlet-ext.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/security</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-security.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/theme</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-theme.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/ui</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-ui.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/util</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-util.tld</taglib-location>
		</taglib>
	</jsp-config>
</web-app>





and my Web.xml look like this

<!--?xml version="1.0" encoding="UTF-8"?-->
<web-app id="WebApp_ID" version="3.0" 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_3_0.xsd">
	<display-name>TestPortletPrime</display-name>
	<context-param>
		<param-name>javax.faces.PROJECT_STAGE</param-name>
		<param-value>Development</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>/faces/*</url-pattern>
  </servlet-mapping>
	
	
	<context-param>
		<param-name>com.ibm.websphere.portletcontainer.PortletDeploymentEnabled</param-name>
		<param-value>false</param-value>
	</context-param>
	
	<filter>
		<filter-name>Invoker Filter - ERROR</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>ERROR</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - FORWARD</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>FORWARD</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - INCLUDE</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>INCLUDE</param-value>
		</init-param>
	</filter>
	<filter>
		<filter-name>Invoker Filter - REQUEST</filter-name>
		<filter-class>com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter</filter-class>
		<init-param>
			<param-name>dispatcher</param-name>
			<param-value>REQUEST</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>Invoker Filter - ERROR</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - FORWARD</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - INCLUDE</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
	<filter-mapping>
		<filter-name>Invoker Filter - REQUEST</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
	</filter-mapping>
	

	<listener>
		<listener-class>com.liferay.portal.kernel.servlet.PluginContextListener</listener-class>
	</listener>
	<listener>
		<listener-class>com.liferay.portal.kernel.servlet.SerializableSessionAttributeListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>TestPortletPrime Servlet</servlet-name>
		<servlet-class>com.liferay.portal.kernel.servlet.PortletServlet</servlet-class>
		<init-param>
			<param-name>portlet-class</param-name>
			<param-value>javax.portlet.faces.GenericFacesPortlet</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet>
		<servlet-name>Dynamic Resource Servlet</servlet-name>
		<servlet-class>com.liferay.portal.kernel.servlet.PortalClassLoaderServlet</servlet-class>
		<init-param>
			<param-name>servlet-class</param-name>
			<param-value>com.liferay.portal.webserver.DynamicResourceServlet</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>TestPortletPrime Servlet</servlet-name>
		<url-pattern>/TestPortletPrime/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Dynamic Resource Servlet</servlet-name>
		<url-pattern>/sprite/*</url-pattern>
	</servlet-mapping>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.htm</welcome-file>
		<welcome-file>index.jsp</welcome-file>
		<welcome-file>default.html</welcome-file>
		<welcome-file>default.htm</welcome-file>
		<welcome-file>default.jsp</welcome-file>
	</welcome-file-list>
	<jsp-config>
		<taglib>
			<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/aui</taglib-uri>
			<taglib-location>/WEB-INF/tld/aui.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/portlet</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-portlet-ext.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/security</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-security.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/theme</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-theme.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/ui</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-ui.tld</taglib-location>
		</taglib>
		<taglib>
			<taglib-uri>http://liferay.com/tld/util</taglib-uri>
			<taglib-location>/WEB-INF/tld/liferay-util.tld</taglib-location>
		</taglib>
	</jsp-config>
</web-app>


Kind Regards
N.H.
thumbnail
Vernon Singleton, modificado hace 9 años.

RE: Primefaces Liferay 6.2 EE

Expert Mensajes: 315 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi N.H.,

N. H.:
... I have develop a primeface Portlet. With the primeface DataTable everything works fine, but when I try to use another component for example pickList oder carousel from primefaces the css styles are missing or destroyed. ...


There is a long thread over here:
https://www.liferay.com/community/forums/-/message_boards/view_message/39341390

And about half way down in that thread, Kyle Steimann describes his recent contribution for Primefaces 5.
https://code.google.com/p/primefaces/source/browse/primefaces/trunk/src/main/resources/META-INF/resources/primefaces-aristo/theme.css#1253

I am not sure if his contribution has made it completely into Primefaces 5.1 or if this has been tested on Liferay running on Websphere, but his css fixes correct all of the known issues with Primefaces 5, and should help you with your issues as well.

Hope that helps,
Vernon