Forums de discussion

Primefaces CSS loading problem

Alireza Goli, modifié il y a 6 années.

Primefaces CSS loading problem

New Member Publications: 10 Date d'inscription: 24/07/17 Publications récentes
Hi,
I want to write a portlet using liferay 6.2+primefaces 6.1. Before adding service builder to project everything is good, but as I add service builder to project and build services , primefaces's CSS files aren't loaded and the portlet appearance is like the picture bellow:






what should I do in order to solve this problem?
thumbnail
Kyle Joseph Stiemann, modifié il y a 6 années.

RE: Primefaces CSS loading problem

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Alireza,
We haven't yet released a version of Liferay Faces that is tested with PrimeFaces 6.1. However, I am surprised by this CSS problem. Could you see if this error occurs with PrimeFaces 6.0? Also please provide us with the shortest, simplest example code that will reproduce this problem (along with steps to reproduce). Finally, please let us know what versions of Liferay Faces you are using.

Thanks,
- Kyle
Alireza Goli, modifié il y a 6 années.

RE: Primefaces CSS loading problem

New Member Publications: 10 Date d'inscription: 24/07/17 Publications récentes
I have tried different versions of Primefaces, but didn't work.
steps to reproduce this problem:
1- Create a Liferay plugin project ( ant build)
2- Add a Liferay JSF portlet
3- Create the above mentioned view file
( after this step view is shown properly)
4- Add a Liferay service builder to project and build something
( after this step view is shown messy and without Primefaces's CSS files)

and finally my Liferay Faces jsf version:

		<dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
		<dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
		<dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
		<dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-portal" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-util" org="com.liferay.faces" rev="3.2.4-ga5" />


Something that is strange for me is that after adding service builder, in tomcat*/webapps/myportlet/WEB-INF/lib
I have two .jar file for primefaces that their names are: primefaces-6.0.jar and org.primefaces.primefaces.jar
but their size is same.

thanks,
Alireza
thumbnail
Kyle Joseph Stiemann, modifié il y a 6 années.

RE: Primefaces CSS loading problem

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Alireza,
Please upgrade to the latest version of Liferay Faces and Mojarra and retry your test. You can obtain the list of jars and versions that you will need by going to liferayfaces.org and selecting Liferay 6.2 and JSF 2.1 from the dropdowns.

- Kyle
Alireza Goli, modifié il y a 6 années.

RE: Primefaces CSS loading problem

New Member Publications: 10 Date d'inscription: 24/07/17 Publications récentes
Hi,
I tried ,but didn't work. The problem is related to duplicate .jar files.When I remove them everything become good again, But I don'nt know how should I prevent these duplicate jar files !

thanks,
Alireza
thumbnail
Kyle Joseph Stiemann, modifié il y a 6 années.

RE: Primefaces CSS loading problem

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Alireza,
Please list all the dependencies for your portlet and your service jar by posting the full ivy.xml files for both.

- Kyle
Alireza Goli, modifié il y a 6 années.

RE: Primefaces CSS loading problem

New Member Publications: 10 Date d'inscription: 24/07/17 Publications récentes
Hi,
I solved my problem by deleting duplicate .jar files in docroot/WEB-INF/lib directory and this is my dependecies:

	<dependencies defaultconf="default">
		<dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
		<dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
		<dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
		<dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-portal" org="com.liferay.faces" rev="3.2.4-ga5" />
		<dependency name="liferay-faces-util" org="com.liferay.faces" rev="3.2.4-ga5" />
		
		<dependency org="org.primefaces" name="primefaces" rev="6.0" />
		
		<dependency conf="test->default" name="arquillian-junit-container" org="org.jboss.arquillian.junit" rev="1.1.6.Final" />
		<dependency conf="test->default" name="arquillian-tomcat-remote-7" org="org.jboss.arquillian.container" rev="1.0.0.CR6" />
		<dependency conf="test->default" name="com.liferay.ant.arquillian" org="com.liferay" rev="1.0.0-SNAPSHOT" />
	</dependencies>

thanks,
Alireza
thumbnail
Kyle Joseph Stiemann, modifié il y a 6 années.

RE: Primefaces CSS loading problem

Liferay Master Publications: 760 Date d'inscription: 14/01/13 Publications récentes
Hi Alireza, glad to hear that you fixed the issue! I highly recommend that you update your jars to the latest versions in order to get important security and bug fixes. Thanks for using Liferay Faces!

- Kyle