title: Is it possible to cancel Ajax-Requests with a custom dialog with Primefaces 3.3?
body: <p>We want to display a confirmation dialog if a user changes values in a <code>selectOneMenu</code>. This works quite good with the browsers native <code>confirm()</code> method because it blocks until the user decides. Is there an elegant (preferable client-side) solution to do this with primefaces dialogs so the look is consistent over different browsers?</p>
  
  <p>Current solution:</p>
  
  <pre><code>&lt;p:selectOneMenu id="som" value="#{foo.item}"&gt;
      &lt;f:selectItems value="#{foo.items}" var="i" itemLabel="#{i.name}" itemValue="#{i.value}" /&gt;
      &lt;p:ajax event="change" onstart="return confirmChange()" /&gt;
  &lt;/p:selectOneMenu&gt;
  
  &lt;script type="text/javascript"&gt;
      function confirmChange() {
          return confirm("O'RLY?");
      }
  &lt;/script&gt;
  </code></pre>