Liferay 7 and PrimeFaces Extensions DocumentViewer

Ingo Schildmann, modified 7 Years ago. New Member Posts: 14 Join Date: 12/21/11 Recent Posts

Hi, 

I've problems using the  PrimeFaces Extensions DocumentViewer (a wrapper for PDF.js) with Liferay 7.

I know there were problems with older versions, that have been fixed 

https://github.com/primefaces-extensions/primefaces-extensions.github.com/issues/352

 

My latest trial uses:

Liferay Faces Portal 3.0.2, Bridge Impl 4.1.1, Bridge Ext 5.0.2, PrimeFaces 6.2 and PrimeFaces Extensions 6.2.6

The console of my browser shows:

TypeError: (intermediate value).exec(...) is null home:1:5396
    b.getFacesResource http://localhost:8080/web/guest/home:1:5396
    <anonym> http://localhost:8080/web/guest/home:361:21
    g/</j http://localhost:8080/web/guest/home:2:29997
    g/</k< http://localhost:8080/web/guest/home:2:30313

 

 

I added a simple Maven project for testing.

Does anyone else use successfully the DocumentViewer extension with Liferay 7?

 

Regards,

Ingo 

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Hi Ingo, You may be running into PrimeFaces #3746. Can you try working around the problem by adding the following to h:head:

<f:facet name="last">
    <h:outputScript>
        // Work around https://github.com/primefaces/primefaces/issues/3746
        PrimeFacesExt.VERSION = null;
    </h:outputScript>
</f:facet>

Let me know if that works. If not, I'll take a closer look at the portlet you've included.

- Kyle

Ingo Schildmann, modified 7 Years ago. New Member Posts: 14 Join Date: 12/21/11 Recent Posts

Thanks Kyle, the workaround helped. 

thumbnail
Kyle Joseph Stiemann, modified 7 Years ago. Liferay Master Posts: 760 Join Date: 1/14/13 Recent Posts

Glad it's working for you, Ingo! Thanks for using Liferay Faces!