Search

19.13. Datatable exporter

download PDF
If you prefer to export an existing JSF datatable instead of writing a dedicated XHTML document, you can execute the org.jboss.seam.excel.excelExporter.export component, passing in the ID of the datatable as an Seam EL parameter. For example, say you have the following datatable:
 
<h:form id="theForm"> 
  <h:dataTable id="theDataTable" value="#{personList.personList}" 
     var="person"> 
    ... 
  </h:dataTable> 
</h:form>
If you want to view this as a Microsoft Excel spreadsheet, place the following in the form:
 
<h:commandLink value="Export" 
   action="#{excelExporter.export('theForm:theDataTable')}" />
You can also execute the exporter with a button, s:link, or other preferred method.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.