Search code examples
jsf-2.2oracle-adfjdeveloper

Show Printable page behaviour


I am developing a web application using Oracle ADF. I need to print a graph from our web application. For this am using show printable page behaviour. Actually I have a page with graph.

I added show Printable behaviour as menu as shown below

enter image description here

when I press Printable View button It is showing entire page as printable view as show below

enter image description here

But I need only graph should be show in printable view as below

enter image description here

How do I achieve this.?? Please help. Thanks in advance.


Solution

  • You can use rendered property on components to prevent printing them:

     <af:outputText value="Do not Print Me" rendered="#{adfFacesContext.outputMode!= 'printable'}" id="ot11"/>
    

    More info, here: https://blogs.oracle.com/jdevotnharvest/entry/how_to_hide_or_show