title: How can I print a xhtml page opened in a tab with JSF?
body: <p>I have three commandlink: the first one open a xhtml page in another tab, the second cancels the operation and the third one saves it (a Cancel and a Save button)</p>
  
  <p>If I put the following script in the xhtml page the Cancel and Save buttons don't work until I print the page or click cancel.</p>
  
  <pre><code>&lt;script&gt;
    $window.load(function(){
      window.print();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I want the other buttons to work regardless of what I do with the page opened in another tab. How can I got about it?</p>