Hi guys,
Good news: looks like I was able to fix the issue.
I was able to locate what exactly causes the issue described in my initial post: everything is because of the:
More specifically, because of the param:
deferred="true", when it is set to
deferred="false" - everything works fine.
Based on the primefaces-test project, the test.xhtml that reproduces the issue looks like in the listing below:
Code: Select all
<f:view>
<f:metadata>
<f:viewAction action="#{testView.onPageLoadOnly}" />
</f:metadata>
<h:head>
<title>PrimeFaces Test</title>
</h:head>
<h:body>
<h:form id="f1">
<h1>#{testView.testString}</h1>
<h:panelGroup layout="block" id="block1">
<p:outputPanel deferred="true">
<p:outputLabel value="#{testView.time}" />
</p:outputPanel>
<p:commandButton value="TestAction" action="#{testView.testAction()}" process="@this" update="@form" />
</h:panelGroup>
</h:form>
</h:body>
</f:view>
As result - it caused <f:viewAction action="#{testView.onPageLoadOnly}" /> to be executed on each p:commandButton click.
In console it looks like this:
https://www.dropbox.com/s/czgpsmgt8dpx6 ... n.jpg?dl=0
But the expected behavior is:
https://www.dropbox.com/s/b856ypaitpvnl ... d.jpg?dl=0
In this case both versions of PrimeFaces 6.1 and 6.2 were affected. Honestly, for a long time I had concerns re behavior of the p:outputPanel with deferred="true" param (due to the number of requests it generates during self-update), thus probably it is time to get rid of it...
The primefaces-test project can be downloaded here:
https://www.dropbox.com/sh/3insuw8tul9h ... RSGaa?dl=0
Any thoughts or updates are highly welcome!
By the way - I have fixed the <f:metadata> tag location and updated the master template respectively, so now f:metadata placed in proper place.
Thank you!