title: PrimeFaces :: display p:Dialog to fill-in a form field, without reposting
body: <p>I have a data-entry form that displays a number of fields (mostly <strong>p:inputText</strong>) for the user to provide. Some of these are LOVs so I display a <strong>p:dialog</strong> to allow the user to select the right value. The <strong>p:dialog</strong> is displayed by means of a <strong>p:commandLink</strong> next to the <strong>p:inputText</strong>. Main parts of code shown below:</p>
  
  <pre><code>&lt;h:form id="parentForm"&gt;
      (...)
      &lt;p:inputText value="#{CustomerCEVController.customer.municipality}" id="customerMncName"/&gt;
      &lt;p:commandLink type="button" onclick="MunicipalityDlg.show()" styleClass="ui-icon ui-icon-search"/&gt;
      (...)
      &lt;p:commandButton value="Submit"  id="save" actionListener="#{CustomerCEVController.saveButtonListener}" /&gt; (...)
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The problem is, whenever the user clicks on the <strong>p:commandLink</strong> to display the <strong>p:dialog</strong> (to allow him to select one of the values) the outer form goes through its lifecycle phases (restore view, apply request values, process validations, etc.) since the <strong>p:commandLink</strong> is placed inside an <strong>h:form</strong>. How can I implement this dialog-displaying functionality while avoiding posting the <strong>h:form</strong> with every dialog that the user opens?</p>