title: JSF / PrimeFaces - printer component - not implemented saveState() and restoreState() methods
body: <p>We are planning to use PrimeFaces PrinterBehavior component to print the data on the page.But there is a NullPointerException thrown when the form (by which the printer tag is wrapped) is submitted;<strong>we realized that it's because of the methods savaState() and restoreState() not being implemented.</strong></p>
  
  <p>Is it a known issue or we missed out something here ?</p>
  
  <p>xhtml code snippet:</p>
  
  <pre><code>&lt;h:commandButton id="printId" value="print"  styleClass="printButton"&gt;
  &lt;p:printer target="useListDatatable" /&gt;
  &lt;/h:commandButton&gt;
  &lt;p:dataTable width="100%" id="useListDatatable"&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Stack Trace:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException: expr
  at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:698)
  at org.primefaces.component.behavior.printer.PrinterBehavior.getScript(PrinterBehavior.java:46)
  at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils._appendClientBehaviourScript(HtmlRendererUtils.java:2004)
  at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.getClientBehaviorScript(HtmlRendererUtils.java:1983)
  at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.buildBehaviorChain(HtmlRendererUtils.java:2154)
  at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.buildBehaviorChain(HtmlRendererUtils.java:2119)
  at org.apache.myfaces.shared.renderkit.html.HtmlButtonRendererBase.buildBehaviorizedOnClick(HtmlButtonRendererBase.java:393)
  at org.apache.myfaces.shared.renderkit.html.HtmlButtonRendererBase.encodeEnd(HtmlButtonRendererBase.java:209)
  at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:657)
  at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:537)
  </code></pre>