This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

How we can generate PDF file for <rich:datatable> data using JSF 2.0 ??

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,
Please help and suggest me. I want to print the data of datatable into pdf format using jsf 2.0 as shown in image . If i click on the link pdf then the same copy of data is generated in PDFs format.

using jsf2.0 .I am using <h:panelGrid columns="1" id="baseConfigList" style="FONT-FAMILY: 'Andale Mono'; width:750px">
<rich:dataTable ........................
............................
</rich:dataTable>
</h:panelGrid>

Remark: Please suggest me how i can show the data of datatable into pdf file. Without Seam.

Thanks In advance.

datatable.jpg
[Thumbnail for datatable.jpg]
DataTable
 
Saloon Keeper
Posts: 21127
131
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not use JSF to generate PDF or other non-HTML files. People keep trying to do this and it works very badly when it works at all, because PDF and HTML are very, very different, and JSF's default renderer is set up for HTML. Use a servlet to generate the PDF, instead. If your JSF backing bean is at session scope or higher, your servlet can read its row data by obtaining the backing bean directly since JSF session-scope beans and J2EE session-scope beans are exactly the same thing, other than how they get initially constructed.
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!