Fórum

Primefaces DataTable example doesn't work in Liferay

Jan Tošovský, modificado 11 Anos atrás.

Primefaces DataTable example doesn't work in Liferay

Liferay Master Postagens: 566 Data de Entrada: 22/07/10 Postagens Recentes
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
thumbnail
Kyle Joseph Stiemann, modificado 11 Anos atrás.

RE: Primefaces DataTable example doesn't work in Liferay

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
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ý, modificado 11 Anos atrás.

RE: Primefaces DataTable example doesn't work in Liferay

Liferay Master Postagens: 566 Data de Entrada: 22/07/10 Postagens Recentes
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ý, modificado 11 Anos atrás.

RE: Primefaces DataTable example doesn't work in Liferay (Resposta)

Liferay Master Postagens: 566 Data de Entrada: 22/07/10 Postagens Recentes
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
thumbnail
Kyle Joseph Stiemann, modificado 11 Anos atrás.

RE: Primefaces DataTable example doesn't work in Liferay

Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Great! Glad you were able to fix it. Thanks for getting back to us.

Thanks for using Liferay Faces.

- Kyle