Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alireza Goli
Use Primefaces commentbox in liferay
July 29, 2017 11:48 PM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

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
Neil Griffin
RE: Use Primefaces commentbox in liferay
July 31, 2017 10:47 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2511

Join Date: July 26, 2005

Recent Posts

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
Marcel Trotzek
RE: Use Primefaces commentbox in liferay
August 4, 2017 12:36 AM
Answer

Marcel Trotzek

Rank: New Member

Posts: 9

Join Date: October 1, 2013

Recent Posts

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
RE: Use Primefaces commentbox in liferay
August 4, 2017 11:46 PM
Answer

Alireza Goli

Rank: New Member

Posts: 10

Join Date: July 24, 2017

Recent Posts

Hi,
Yes I will fork the project and change it.
thank you Neil and Marcel,
Alireza
Marcel Trotzek
RE: Use Primefaces commentbox in liferay
September 22, 2017 1:31 AM
Answer

Marcel Trotzek

Rank: New Member

Posts: 9

Join Date: October 1, 2013

Recent Posts

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
RE: Use Primefaces commentbox in liferay
November 6, 2017 2:14 PM
Answer

Kimani Njoroge

Rank: New Member

Posts: 1

Join Date: November 6, 2017

Recent Posts

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.
1<p:tabView dynamic="true"/>


No error in server logs but in firefox console there is an error

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


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

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