Exporting data to a client file

You can export data from the server and download it to a file in the client by using the ADF Faces File Download Action Listener component, available in the Operations section of the Component Palette. Simply specify the default export filename and a managed bean method to handle the download. To actually export the data from the model using business components, you will have to iterate through the relevant view object and generate the exported string buffer.

In this recipe, we will use the File Download Action Listener component (af:fileDownloadActionListener) to demonstrate how to export all employees to a client file. The employees will be saved in the file in a comma-separated-values (CSV) format. ...

Get Oracle JDeveloper 11gR2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.