title: Update primefaces dialog on show
body: <p>I'm trying to update a primefaces dialog every time it pops up.
  The dialog is triggered by a calendar field changing and the actual call is made from the bean.
  When I call it the first time, the datas are fine but, if I close it and open it again, it'll still show the old datas.
  It kinda makes sense: it's rendered just once and then it's shown and hidden and never actually updated.</p>
  
  <p>I was thinking about updating it before the dialog.show() in the bean, but I don't know how to do that.
  Any idea?</p>
  
  <pre><code>&lt;p:dialog
          site        ="sectionDlg"
          widgetVar   ="Dlg"
          minWidth    ="430"
          modal       ="true"
          closable    ="true"
          resizable   ="false"
          dynamic     ="true"
          width="450" height="300"
  &gt;
  
  
  &lt;h:form id="Form"&gt;
      &lt;br/&gt;
      &lt;p:panelGrid id ="dates" styleClass="cmt-no-grid-100perc" columns="4"&gt;
      &lt;calendar        attribName ="offerStartDateDlg"
                                  value       ="#{bean.startDate}"
                                  writable    ="#{false}"/&gt;                           
  
      &lt;calendar        attribName="offerEndDateDlg"
                                  value="#{bean.endDate}"
                                  writable="#{false}"/&gt;
      &lt;/p:panelGrid&gt;
      &lt;div align="center"&gt;
          &lt;p:commandButton
              onclick ="PF('whichSectionDlg').hide()"
              &gt;
          &lt;/p:commandButton&gt;
          &lt;p:commandButton
              onclick ="PF('whichSectionDlg').hide()"&gt;
          &lt;/p:commandButton&gt;
      &lt;/div&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p></p>
  
  <p>This could make things easier</p>