title: Primefaces Confirm Message Updated Value
body: <p>I'm trying to show an updated value in confirm dialog message but I keep getting the old value as in this scenario </p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:inputText value="#{bean.object.amount}"/&gt;
      &lt;p:commandButton value="CALCULATE" update="cal" actionListener="#{bean.calculate()}"/&gt;
  
      &lt;h:panelGroup id="cal"&gt;
          &lt;h:outputText value="#{bean.object.amount}"/&gt;
          &lt;p:commandButton value="SUBMIT" actionListener="#{bean.submit()}"&gt;
               &lt;p:confirm header="Confirmation" message="Amount is : #{bean.object.amount} ?"/&gt;
          &lt;/p:commandButton&gt;
  
          &lt;p:confirmDialog global="true"&gt;
               &lt;p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" /&gt;
               &lt;p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" /&gt;
          &lt;/p:confirmDialog&gt;
      &lt;/h:panelgGroup/&gt;
  
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Bean code:</p>
  
  <pre><code>@ManagedBean(name="bean")
  @ViewScoped
  public class Bean implements Serializable {
         private SomeClass object;
  
         @PostConstruct
         public void init(){
              this.object = new SomeClass();
         }
  
          public void calculate(){
              //do some colculation (not related to amount field in object)
          }
  
          public void submit(){
               //submit to database
          }
  
          //getter setter
  
  }
  </code></pre>
  
  <p>When I enter a value in amount, lets say 50. and update the cal component I get the updated amount in the outputtext "50". However, in the confirm button message I get amount as 0 instead 50. How can I show the updated value in the confirm message?</p>
  
  <p>PS:
  Primefaces-4.0</p>