title: Diplay a <p:confirmDialog> from javascript
body: <p>I need to display a <code>p:confirmDialog</code> from the JavaScript.</p>
  
  <p>I've tried:</p>
  
  <pre><code>&lt;p:confirmDialog id="users"  widgetVar="UsersWidget" severity="alert" closable="false"&gt;
  
      &lt;h:outputText value="Please specify the UserID of the contractor to whom a mail need to be sent"&gt;&lt;/h:outputText&gt;
      &lt;h:inputText&gt;&lt;/h:inputText&gt;
      &lt;p:commandButton id="OK" value="add"&gt;&lt;/p:commandButton&gt;
      &lt;p:commandButton style="font-size:1.1em;" id="Cancel" 
          value="cancel" action="#{Bean.Report}"   &gt;
      &lt;/p:commandButton&gt;
  
  &lt;/p:confirmDialog&gt;
  
  &lt;f:selectItem itemLabel="Select One" itemValue="" /&gt;
  &lt;f:selectItems value="#{Bean.usersList}"/&gt;
  &lt;f:selectItem itemLabel="Other" itemValue="Other" /&gt;
  &lt;p:ajax listener="check()" /&gt;
  </code></pre>
  
  <p>My Javascript</p>
  
  <pre><code>&lt;h:head&gt;
  &lt;script language="javascript"&gt;
      function check() {
          alert("Entered");
          RequestContext.getCurrentInstance().execute("UsersWidget.show()");
          alert("Working!!");
      }
  &lt;/script&gt;
  &lt;/h:head&gt;
  </code></pre>
  
  <p>i can see the alert entered byt i cannot see the conform dialog and the working alert</p>