I've got a problem in using update="@all" to let Primefaces update the whole page. Given this example:
Code: Select all
<h:body id="myBody">
<h:panelGroup id="bodyChildPanel">
<h:form id="myform">
<h:outputText id="outputCounter" value="#{myBean.counter}"/><br/>
<h2>Working:</h2>
<p:commandButton action="#{myBean.increment}" update="outputCounter" value="Increment (outputCounter)"/>
<p:commandButton action="#{myBean.increment}" update="@form" value="Increment (@form)"/>
<p:commandButton action="#{myBean.increment}" update=":bodyChildPanel" value="Increment (bodyChildPanel)"/>
<h2>Defunct (Value correct in Ajax-Response but browser view not updated):</h2>
<p:commandButton action="#{myBean.increment}" update=":myBody" value="Increment (myBody)"/>
<p:commandButton action="#{myBean.increment}" update="@all" value="Increment (@all)"/>
<p:commandButton action="#{myBean.increment}" value="Increment (p:ajax @all)">
<p:ajax update="@all"/>
</p:commandButton>
</h:form>
</h:panelGroup>
</h:body>
Tested with:
Primefaces 3.1.1 and 3.2-SNAPSHOT download from 2nd March 2012
Mojarra 2.1.7
Tomcat 7.0.23
A feasible workaround for this problem is to put a <h:panelGroup> just below <h:body> and us this as update-target. However, this slightly modfies the HTML structure and @all would be more intuitive.
Does anybody have this problem too? Is this a general limitation of how Primefaces works or just a bug? I can attach a fully working minimalistic example webapp (.war) demostrating the problem if desired.
Cheers
Adrian