Fórum

Use Primefaces commentbox in liferay

Alireza Goli, modificado 6 Anos atrás.

Use Primefaces commentbox in liferay

New Member Postagens: 10 Data de Entrada: 24/07/17 Postagens Recentes
Hi,
Is there any way to use primefaces commentbox inside liferay portlets?
commentbox project:
http://www.whitebyte.info/programming/introduction-into-commentbox
https://github.com/nickrussler/commentbox

I tried but I got some errors:
ERROR [BaseURLEncodedStringImpl:56] URL path must start with a '/' or include '://'
java.lang.IllegalArgumentException: URL path must start with a '/' or include '://'

Thanks,
Alireza
thumbnail
Neil Griffin, modificado 6 Anos atrás.

RE: Use Primefaces commentbox in liferay

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Hi Alireza,

I didn't know about the CommentBox project -- thank you for bringing it to my attention.

I built the project from source and was able to reproduce a problem similar to the one you reported. Upon further investigation, I saw that the project depends on an old/missing primefaces.css resource (from PrimeFaces 3.5, a fairly old version) and then I saw that the most recent commit states that the CommentBox project is no longer maintained.

So I'm sad to say that unless you fork the project and bring it up-to-date with PrimeFaces 6.1 and JSF 2.2, then it will not be possible to use it in a modern PrimeFaces webapp or portlet application.

Kind Regards,

Neil
thumbnail
Marcel Trotzek, modificado 6 Anos atrás.

RE: Use Primefaces commentbox in liferay

New Member Postagens: 9 Data de Entrada: 01/10/13 Postagens Recentes
Hi Alireza,

We are actually using the commentbox component for our Scrum Portlet since Liferay 6 and had exactly the same problem when migrating to Liferay 7. I have therefore built the project myself (which I already did before due to a few other problems) and was able to use it with PrimeFaces 6.1 and Liferay 7.

As Neil already mentioned, the issue is mainly caused by outdated references and a few equally outdated passages in the Facelet code, like references to widgetVars. If this is an option for you, you can easily fix these by building the project from source as well. Let me know if you need help with any specific issue. If I find some time for this, I might create a fork of commentbox with these changes.
Alireza Goli, modificado 6 Anos atrás.

RE: Use Primefaces commentbox in liferay

New Member Postagens: 10 Data de Entrada: 24/07/17 Postagens Recentes
Hi,
Yes I will fork the project and change it.
thank you Neil and Marcel,
Alireza
thumbnail
Marcel Trotzek, modificado 6 Anos atrás.

RE: Use Primefaces commentbox in liferay

New Member Postagens: 9 Data de Entrada: 01/10/13 Postagens Recentes
Hi again,

In case you (or someone else) still needs an updated version of commentbox, we have now published our version on GitHub: github.com/rtg-portale/commentbox

This version has been modified to work with PrimeFaces 6.1 (and Liferay 7) and is used for our own Scrum Portlet. We have not tested it in a standalone JSF application yet and can only guarantee that the features we use in our portlet work. We will check the rest as soon as possible and can maintain this fork if some people are interested. Let me know if you should encounter any problems.
Kimani Njoroge, modificado 6 Anos atrás.

RE: Use Primefaces commentbox in liferay

New Member Mensagem: 1 Data de Entrada: 06/11/17 Postagens Recentes
Hi Marcel,
I have tried the comment box and it has worked on well so far. Recently I added it to p:tabView and it couldn't work since it contains h:form element. To work around this I removed the p:tabView from its h:form parent. After adding it to the second tab, the tab can't load when the p:tabView dynamic attribute is set to true.
[indent]
<p:tabview dynamic="true" />
[/indent]

No error in server logs but in firefox console there is an error
[indent]

POST XHR http://localhost:8040/CommentBoxDemo-2.0.2/test.xhtml [HTTP/1.1 200 OK 424ms]
ReferenceError: j_idt98_commentboxWrapper is not defined[Learn More] jquery.js.xhtml:1:205
[/indent]

I am working with
  • WildFly 10.1.0 Final
  • have tried mojarra 2.2.13, 2.2.14 and 2.2.15 to no avail
  • PrimeFaces 6.1