Printer-Friendly View

The Printer-Friendly View is a BI Beans thin bean, for use in an HTML-client application. It presents a thin Dataview in a printer-friendly display. Users can then print the view through the browser's print feature.

The ThinBeanUI implementation of the Printer-Friendly View is the oracle.dss.thin.beans.dataView.PrinterFriendlyView class. The UINode for the Printer-Friendly View is oracle.dss.thin.beans.dataView.PrinterFriendlyViewBean. Your servlet must associate the PrinterFriendlyView object with the PrinterFriendlyViewBean object.

The JSP tag for this dialog is the PrinterFriendlyView tag. In the UIX Language, the definition element is the printerFriendlyViewDef element, and the UINode is the printerFriendlyView element.

The Printer-Friendly View does not need to be stored in the HTTP session.

Invoking the Printer-Friendly View

The Printer-Friendly View is invoked from the Print Options dialog bean. You set an event target on the PrintOptions to route the INIT_PRINTER_FRIENDLY_VIEW_EVENT from the PrintOptions to the PrinterFriendlyView.

Users use the print feature of the browser to print the Printer-Friendly View. The Printer-Friendly View does not display any other buttons or hyperlinks on the same page, so users must use the Back button of the browser to return to the view that they printed.

Customizing the Printer-Friendly View page

The Printer-Friendly View displays only a printable version of the view that is to be printed. If you want to display other items on the Printer-Friendly View page, then you can register a PrinterFriendlyViewCallback with the PrinterFriendlyView. For example, you would implement the callback if you wanted to add a logo to the page.

When there is a registered callback, the PrinterFriendlyView passes to the callback the UINode for the printable version of the view. In the callback, you render the page, adding the passed UINode to the UINode tree.

Events that this bean generates

The Printer-Friendly View bean does not generate any events.

Event that this bean handles

The PrinterFriendlyView handles the INIT_PRINTER_FRIENDLY_VIEW_EVENT, which is defined in the oracle.dss.thin.beans.BIConstants interface.

After it handles the event, the PrinterFriendlyView object fires an InitEvent to any ThinBeanDialogListener implementations that have been registered with it.

Initializing the Printer-Friendly View

Initialize the Printer-Friendly View as you would initialize any thin bean dialog. In your initialization code, set the view to print, by calling PrinterFriendlyView.setView.