Is there a workaround to use p:fileDownload?

Bernd S, modified 6 Years ago. Junior Member Posts: 59 Join Date: 3/31/15 Recent Posts
Hello,

I am currently developing a JSF Portlet using Primefaces 6.2 and Liferay 7.0. One requirement is to download files, for which I am using p:fileDownload.

The download itself works but since it takes some time, I want to block the page while downloading. Originally this should be covered by using the component's PrimeFaces.monitorDownload(start, stop);. But unfortunately the stop method is never called.
While looking for a solution I found https://issues.liferay.com/browse/FACES-1513 which mentions a portlet incompatibility.

Sine the issue is pretty old I wanted to ask if there is any solution or workaround available now?

Kind Regards,
Bernd
thumbnail
Neil Griffin, modified 6 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Hi Bernd,
I remember working on the fix to FACES-1513 and was unable to fix the {{PrimeFaces.monitorDownload(start, stop)}} problem due to portlet environment incompatibilities with the way PrimeFaces uses cookies to track the download. I wish I had a solution for you but sadly I don't.
Kind Regards,
Neil