Foros de discusión

Primefaces missing head resources on refresh (cache?)

Corentin Mulders, modificado hace 9 años.

Primefaces missing head resources on refresh (cache?)

New Member Mensajes: 2 Fecha de incorporación: 4/08/14 Mensajes recientes
Hello,

I'm currently working on some primefaces 4 portlets in a liferay 6.1.3 portal. I use the 3.1.4-ga5 bridge.

Most of the time my portlets work perfectly. However, I encounter the following issue on a regular basis :
1) I submit a form in a primefaces portlet which was displayed without any problem.
2) The redirection to the confirmation works without any problem.
3) Then I go back to the portlet using its url or a button.
4) Now the problem appears, the elements that were added by primefaces in the html <head> section (filled in my empty <h:head/> in my view) that were present before are missing. The portlet is present but without any css and javascript. A second manual refresh is enough to recover the complete page with the missing <head> elements.

It is peculiar that the problem only appears after sending a form and that it goes away after a refresh. Could it be possible that liferay caches the contents of a previously rendered portlet and would lose the headers part of it ? If so why would it not fail more often ?

I tried setting the expiration-cache to 0 and layout-cacheable to false but it didn't change anything.

Do you have any idea to solve the problem ? I thought of adding an empty invisible portlet in my theme that would include the primefaces headers but it's not a clean solution.

Regards.
thumbnail
Vernon Singleton, modificado hace 9 años.

RE: Primefaces missing head resources on refresh (cache?)

Expert Mensajes: 315 Fecha de incorporación: 14/01/13 Mensajes recientes
Hi Corentin,
Corentin Mulders:
Now the problem appears, the elements that were added by primefaces in the html <head> section (filled in my empty <h:head/> in my view) that were present before are missing. The portlet is present but without any css and javascript. A second manual refresh is enough to recover the complete page with the missing <head> elements.

Does this happen with the primefaces portlet demo?
Corentin Mulders:
It is peculiar that the problem only appears after sending a form and that it goes away after a refresh. Could it be possible that liferay caches the contents of a previously rendered portlet and would lose the headers part of it ?

We have not noticed this in any of our testing. Maybe you could make a small modification to the primefaces3-portlet demo, so it reproduces the problem. Without those details it is going to be difficult to know what is causing your exact issue. You can use these instructions for building the primeface3-portlet from source. Just make sure that you checkout the 3.1.4-ga5 version of the code.

Vernon
Corentin Mulders, modificado hace 9 años.

RE: Primefaces missing head resources on refresh (cache?)

New Member Mensajes: 2 Fecha de incorporación: 4/08/14 Mensajes recientes
Hello,

Thank you for the answer.

My portlet is deployed on a weblogic server (which might be linked to the bug, I should have thought to mention it) so it makes deploying the demo portlet a little bit more complicated. I don't have time to try to compile it with the weblogic specific steps right now but I'll try to reproduce the problem with a demo portlet asap.