Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alireza Goli
Primefaces CSS loading problem
July 24, 2017 5:28 AM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

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?
Kyle Joseph Stiemann
RE: Primefaces CSS loading problem
July 24, 2017 7:04 AM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: January 14, 2013

Recent Posts

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
RE: Primefaces CSS loading problem
July 24, 2017 10:00 AM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

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:
1
2        <dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
3        <dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
4        <dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
5        <dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="3.2.4-ga5" />
6        <dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="3.2.4-ga5" />
7        <dependency name="liferay-faces-portal" org="com.liferay.faces" rev="3.2.4-ga5" />
8        <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
Kyle Joseph Stiemann
RE: Primefaces CSS loading problem
July 24, 2017 10:03 AM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: January 14, 2013

Recent Posts

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
RE: Primefaces CSS loading problem
July 25, 2017 2:30 AM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

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
Kyle Joseph Stiemann
RE: Primefaces CSS loading problem
July 25, 2017 5:55 AM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: January 14, 2013

Recent Posts

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
RE: Primefaces CSS loading problem
July 27, 2017 11:51 PM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

Hi,
I solved my problem by deleting duplicate .jar files in docroot/WEB-INF/lib directory and this is my dependecies:
 1
 2    <dependencies defaultconf="default">
 3        <dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
 4        <dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
 5        <dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
 6        <dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="3.2.4-ga5" />
 7        <dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="3.2.4-ga5" />
 8        <dependency name="liferay-faces-portal" org="com.liferay.faces" rev="3.2.4-ga5" />
 9        <dependency name="liferay-faces-util" org="com.liferay.faces" rev="3.2.4-ga5" />
10       
11        <dependency org="org.primefaces" name="primefaces" rev="6.0"/>
12       
13        <dependency conf="test->default" name="arquillian-junit-container" org="org.jboss.arquillian.junit" rev="1.1.6.Final" />
14        <dependency conf="test->default" name="arquillian-tomcat-remote-7" org="org.jboss.arquillian.container" rev="1.0.0.CR6" />
15        <dependency conf="test->default" name="com.liferay.ant.arquillian" org="com.liferay" rev="1.0.0-SNAPSHOT" />
16    </dependencies>

thanks,
Alireza
Kyle Joseph Stiemann
RE: Primefaces CSS loading problem
July 28, 2017 6:03 AM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: January 14, 2013

Recent Posts

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

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!