Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jan Tošovský
Primefaces DataTable example doesn't work in Liferay
February 8, 2013 2:25 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 329

Join Date: July 22, 2010

Recent Posts

Dear All,

I've successfully implemented several JSF2.0 portlets with Primefaces components. But now I've encountered an issue with the DataTable with selectable rows http://www.primefaces.org/showcase/ui/datatableRowSelectionRadioCheckbox.jsf

JavaScript is broken somehow and there is no way to select all the rows at once. When several items are checked individually and then the button is pressed, the row list is empty.

It works fine as a standard Web App.

I really don't know if this is Primefaces or Liferay or Bridge problem.

Has anybody an idea how to fix this?

Thanks, Jan

Tomcat 6, PF 3.4.1, Faces Bridge 3.1.1-ga2
Kyle Joseph Stiemann
RE: Primefaces DataTable example doesn't work in Liferay
February 11, 2013 12:24 PM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Regular Member

Posts: 129

Join Date: January 14, 2013

Recent Posts

Hi Jan,
I just tried to reproduce the problem on my Linux desktop with the following environment:
Liferay Portal 6.1.1-ce-ga2 + Tomcat 7
Liferay Faces 3.1.1-ce-ga2
Linux Desktop with Chrome and FireFox

All I did was take the primefaces3-portlet demo and then copy the code from the PrimeFaces Showcase and it worked OK. I was able to click on checkboxes, and then click on the "Check All" checkbox and it worked. Please let me know if your environment is different in some way. Thanks, Kyle.
Jan Tošovský
RE: Primefaces DataTable example doesn't work in Liferay
February 12, 2013 12:23 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 329

Join Date: July 22, 2010

Recent Posts

I haven't found the complete PF portlet source code here (only part of it) so I created the portlet from the scratch. It could be the reason.
http://www.liferay.com/community/liferay-projects/liferay-faces/demos
The corresponding folder in GitHub is missing. But now I've found the required info (portlet settings, Maven dependencies) in the binary WAR file.
I'll try.
Jan Tošovský
RE: Primefaces DataTable example doesn't work in Liferay
February 12, 2013 1:11 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 329

Join Date: July 22, 2010

Recent Posts

I've found the 'Primefaces is not defined' error in the console .

All this issue turned out to be caused by missing <h:head> tag in my xhtml page. It works properly after adding this tag.

Jan
Kyle Joseph Stiemann
RE: Primefaces DataTable example doesn't work in Liferay
February 12, 2013 11:47 AM
Answer

Kyle Joseph Stiemann

LIFERAY STAFF

Rank: Regular Member

Posts: 129

Join Date: January 14, 2013

Recent Posts

Great! Glad you were able to fix it. Thanks for getting back to us.

Thanks for using Liferay Faces.

- Kyle