Another cool component in Oracle ADF is af:showPrintablePageBehavior with just simple click you can set the any af:table component as Printable page using af:showPrintablePageBehavior.
In this post i will continue to enhance my last post example. I will just add another menu command item in our File menu of af:panelCollection component and use Printable page behaviour inside.
Steps to follow:
- Right click af:menu and choose insert inside af:menu > Command Menu Item and set Text as "Print Data" as shown in the slide.
- Drop Show Printable Page Behavior component from component palette on newly created menu.
Alternately you can just put this code in your JSF page source under af:menu tags later you will feel more comfortable doing coding directly in source file.
- Thats all right click the page and choose Run
- Filter the Records of table only Region > 2 and press enter choose Print Date from File Menu
You can see with Oracle ADF how easy is to implement some cool features in your application.
Download my completed example