Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
12c (12.1.3)

E41657-01

<af:showPrintablePageBehavior>

showPrintablePageBehavior show printable page behavior


The showPrintablePageBehavior tag is a declarative way show a printable page. It may be added underneath any "command" component - commandButton, commandLink, commandMenuItem, commandToolbarButton, etc. When that button is clicked, a new browser window will be displayed (or, potentially, a new tab, depending on the browser) that has the printabel look-and-feel. Printable pages lack all navigational components, and generally eliminate scrolling so that all contents can be printed. Note that the command component will not submit an action event to the server (the event is cancelled), though there will be a request to the server to get the printable page.

Accordions and splitters:

In general, accordions and splitters should not be printed as a whole. Instead, you should print only an item of the accordion or pane of the splitter at a time. All you need to implement this is to put the showPrintablePageBehavior on a command component that is inside of the pane or accordion - the rich client will automatically only show the contents of that pane since accordions and splitters are considered printable roots.

Popups:

Just like accordions and splitters, popups are considered a printable root. If you put a showPrintablePageBehavior tag inside a component within a popup, a printable page will render showing that component up the component tree until you reach the popup. Any components outside of the popup will not be in the printable page. All you need to implement this is to put the showPrintablePageBehavior on a command component that is inside of the popup - the rich client will automatically only show the contents of that popup.

</section> <section name="Code_Example_s_">

This example will show a button called "Click me". When the button is pressed, a new printable page will appear in a browser window.


  <af:commandButton text="Click me">
      <af:showPrintablePageBehavior/>
  </af:commandButton>