i have this structure:
mainTemplate.xhtml
...
Code: Select all
<h:commandButton action="firstpage.xhtml" value="Go to first Page" />
firstpage.xhtml
...
Code: Select all
<ui:composition template="/WEB-INF/template/mainTemplate.xhtml">
<ui:define name="content">
<f:metadata>
</f:metadata>
<ui:include src="secondpage.xhtml"/>
</ui:define>
</ui:composition>
secondpage.xhtml
...
Code: Select all
<p:commandButton id="commandButton" ... />
<p:poll interval="1" update="commandButton" action="#{firstManagedBean.firstMethod}" />
Question is, why the PostConstruct Method of firstManagedBean is called on each intervall.
- firstMethod in example is not the PostConstruct
- managedBean is SessionScoped
- all variables (the whole menagedBean) are reinitialized too