1 Reply Latest reply on Nov 7, 2008 4:22 PM by nickarls

    Datatable excel export problem

    mail.micke

      Hi


      I'm having trouble exporting a datatable using the excelExporter.


      I've tried with both a RichFaces and normal datatable.
      What happens is that I get an empty excel file.


      When using the XHTML tags I can create excel files without any problems (not entierly true haven't gotten the templateURI to work yet for me). But when trying to export a datatable I have problems.


      I've made sure that the ID is correct and I don't see any logging output indicating a problem.


      Using :


      Seam 2.1.0.SP1
      JSF Mojarra 1.2_10
      RichFaces 3.2.2.GA
      Facelets 1.1.14
      



      XHTML:


      <h:form id="editForm">
           <h:dataTable id="listTable" value="#{detailEdit.persons}"
                               var="person">
                <h:column>
                     <f:facet name="header">
                          First Name
                     </f:facet>
                     #{person.lastName}                    
                </h:column>
                <h:column>
                     <f:facet name="header">
                          Last Name
                     </f:facet>
                     #{person.firstName}
                </h:column>
                <h:column>
                     <f:facet name="header">
                          Birth Date
                     </f:facet>
                     #{person.birth}
                </h:column>
           </h:dataTable>
      
           <h:commandLink value="Export to Excel" 
                             action="#{excelExporter.export('editForm:listTable')}"/>
      </h:form>
      



      Cheers,
      micke