p:poll initialize @PostConstruct

UI Components for JSF
Post Reply
ayibogan
Posts: 9
Joined: 17 Aug 2010, 16:30

29 Jul 2011, 14:30

Hi,
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 58 guests