Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6084359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:30:45+00:00 2026-05-23T11:30:45+00:00

Unfortunately, OpenFaces Datatable has not yet an export capability unlike Primefaces or IceFaces. While

  • 0

Unfortunately, OpenFaces Datatable has not yet an export capability unlike Primefaces or IceFaces.
While Exporting is a piece of cake, filtering an IceFaces or primefaces datatable is less easy, Yet primeFaces’s filtering does not work with JSF DataModel (sad but true).

Using OpenFaces DataTable filtering is a piece of cake and so handy and powerful.
But how about The end user who wants to export a datatable that s/he filtered, to a format like CSV or MS Excel.

The great Dmitry from OpenFaces, gave me a hint :
Use OpenFaces DataTable method: getDisplayedRowDatas() that will grab the currently displayed rows from a datatable, then use some thrid library like Itext to export in PDF for example.

In my head, this should go this way:

  • Create a backing bean for this purpose.
  • Add Apache POI third library to the classpath
  • Write code using Apache POI to export the content of the OpenFaces datatable with its method getDisplayedRowsDatas() – but I am afraid this method does not return the names of columns’ headers – or grab the HTML table rendered by an OpenFaces Datatable as a buffered string and use Apache POI to produce an Excel file streamed with the Buffer.

In the MyFaces example I came across recently: MyFaces Datatable Export Example, the developer uses Myfaces component <t:buffer value=#{myExportBean.myBufferString}> datatable here </t:buffer /> to transform the content of the datatable to a buffered String which makes things easier. JSF Core does not have such component unfortunately.

Did someone come across this before? Help or better alternatives are much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:30:45+00:00Added an answer on May 23, 2026 at 11:30 am

    You can check out the experimental DataTable export API, which is available in the current nightly build. We’ll declare this API officially if it stands the test of time. For now, only CSV export is available, but you can write your own exporters for other formats. Here’s the code that you should put in your action handler to make it work:

    DataTable myTable = Faces.component("form:myTable", DataTable.class);
    myTable.export(new CSVTableExporter());
    

    It exports the data for all of the rows and columns as currently displayed by the table (only the current page of a paginated table is exported currently).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Unfortunately the solutions have not worked yet; setting result.values pointer to 0 doesn't actually
Unfortunately, my question is not as simple as keeping track of two windows created
Unfortunately, the problem is not more specific than that. I've found a few examples
Unfortunately, I'm not familiar with Perl, so asking here. Actually I'm using FCGI with
(Unfortunately, this question is about a non-recommended practice. While I appreciate advise against doing
Update : Unfortunately the help offered below did not solve my problem of sharing
Hi unfortunately I'm not so good in the whole garbage collection thing. Now I
Unfortunately setTimeout is not implemented for JDBC/postgres. Is there some way I can simulate
Unfortunately, Lucida Grande does not have an italic variant and I need one. My
Unfortunately I'm not using PHP 5. On the documentation of the date function it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.