views:

35

answers:

3

i am a newbie to JSf and Tomahawk Technology. In application i am having a datatable, i want store the information from he data table into a PDF format on a click of a button using Tomahawk and SandBox.Kindly Help.

A: 

You may need iText for this.
Also see this - http://www.junlu.com/msg/281869.html

Padmarag
+1  A: 

Even better, use JasperReports. It uses iText behind the scene to export reports to PDF.

Boris Pavlović
A: 

As you have mentioned you are using sandbox, use exporterActionListener component in the sandbox to export the data from data tabel into PDF. You need the itext-0.99.jar use the same version

Code sample

<!-- sandbox tag library declaration -->
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
   .
   .  <!-- your data Tabel will be here -->
   .
   .

<h:commandButton value="Export as pdf">
     <s:exporterActionListener for="Id of the Data Tabel" fileType="PDF" />
</h:commandButton>
Hari