Hello All ,
This posts talks about a requirement of printing a simple page (not much component as, form,tree,etc & not much data)
you can use a simple one liner javascript function to invoke browser's print dialog.
In Mozilla-
after printing, the page look like this
Sample ADF Application- Download
Cheers :-)
This posts talks about a requirement of printing a simple page (not much component as, form,tree,etc & not much data)
you can use a simple one liner javascript function to invoke browser's print dialog.
- there is a page with Departments table on it, and a button to print this page
- Called this simple javascript function on button click to open print dialog
- to execute javascript through managed bean use this method
- click on print button- In Google Chrome
window.print();
/**Method to execute Javascript * @param javascriptCode */ public static void runJavaScriptCode(String javascriptCode) { FacesContext facesCtx = FacesContext.getCurrentInstance(); ExtendedRenderKitService service = Service.getRenderKitService(facesCtx, ExtendedRenderKitService.class); service.addScript(facesCtx, javascriptCode); }
In Mozilla-
after printing, the page look like this
Sample ADF Application- Download
Cheers :-)