title: open a new window in a4j:commandButton
body: <p>Using A4J, Richfaces in a web application, I need to open a new browser window when the user clicks on the <code>&lt;a4j:commandButton&gt;</code>.</p>
  
  <p>I think I will have to use <code>window.open(URL, ...)</code>. Where should I put it? </p>
  
  <p>My <code>&lt;a4j:commandButton&gt;</code> looks like this:</p>
  
  <pre><code>&lt;a4j:commandButton id="elementDetailsButton"
      onclick="if (!confirm('Are you sure? Unsaved data will be lost')) { return false; }"
      action="#{myBean.elementDetailsAction}"
      value="Element Details"&gt;
      &lt;a4j:actionparam name="elementDetailsString"
          value="getElementDetails()"
          assignTo="#{myBean.elementDetails}" noEscape="true"&gt;
      &lt;/a4j:actionparam&gt;
  &lt;/a4j:commandButton&gt;
  </code></pre>