We have complex JSF page composed of repeatable primefaces components like p:dataTable, p:tabView, ui:repeat, c:foreach, javascript, etc. The page consists of two separate forms with ids formHeader and formBPM What is strange, execution of h:commandButton, which is placed in form formHeader, results in calling all getter, render and test expressions in form formBPM. Expressions are called both in RestoreView and RenderResponse phases.
<h:form id="formHeader" enctype="multipart/form-data;charset=UTF-8">
<h:commandButton value="Call this" type="button">
<f:ajax execute="@this" />
</h:commandButton>
</h:form>
<h:form id="formBpm">
<p:tabView...>
<p:dataTable....>
</p:dataTable>
....
</p:tabView>
</h:form>
Original page is too complex and is overloaded by dynamic components and java scripts. But I have modeled the above page in simplified structure and checked logging
<h:form id="formHeader" enctype="multipart/form-data;charset=UTF-8">
<h:commandButton value="Call this" type="button">
<f:ajax execute="@this" />
</h:commandButton>
<h:commandButton value="Call form render form" type="button">
<f:ajax execute="@form" render="@form"/>
</h:commandButton>
<h:commandButton value="Call formBpm" type="button">
<f:ajax execute=":formBpm"/>
</h:commandButton>
<h:commandButton value="Call formBpm render formBpm" type="button">
<f:ajax execute=":formBpm" render=":formBpm"/>
</h:commandButton>
<p:outputLabel id="labelThisid" value="#{testBean.varThis}"></p:outputLabel>
</h:form>
<h:form id="formBpm">
<p:outputLabel id="labelid" value="#{testBean.var1}"></p:outputLabel>
<p:tabView id="tabViewId" >
<p:tab id="tabId1" title="#{testBean.tab1}">
</p:tab>
<p:tab id="tabId2" title="#{testBean.tab2}" rendered="#{testBean.tab2Show}">
</p:tab>
</p:tabView>
</h:form>
According to log, on simplified page no getters are executed on "Call this" click, they are executed only if appropriate form is rendered, not executed. Moreover, getters are called only on RenderResponse phase. What may be the reason of inappropriate getters calling on original complex page?
Primefaces 6.1 jBoss EAP 6.4 JSF Mojarra 2.1.28