title: How to redirect to a page after printing with primefaces Printer?
body: <p>I have used the primefaces printer and wanted to redirect to previous page after printing.I used Printer like this:</p>
  
  <pre><code>   &lt;p:commandButton  value="Print" type="button" title="Print" actionListener="#{currentpage.redirect}"&gt; 
          &lt;f:ajax execute="@this"/&gt;
          &lt;p:printer target="printer" /&gt;
      &lt;/p:commandButton&gt; 
  </code></pre>
  
  <p>In redirect method of currentpage bean i deleted the record which works fine but if i try to redirect it to previous page it doesn't do anything.</p>
  
  <pre><code>public void redirect(ActionEvent actionevent) {
                /* Deleted the record */ 
  }
  </code></pre>
  
  <p>Please guide me if i can do this way or anyother way.
  Thanks in advance.</p>