1 Reply Latest reply on Nov 17, 2010 12:17 PM by ginni machamer

    Seam 2.2.1 CR1 & Excel

    ginni machamer Newbie

      I have searched the forums, followed all the examples and suggestions (including Lance's excellent post) but nothing will get me past this error:

      Target Unreachable, 'excelExporter' returned null on 'org.jboss.seam.Namespace'

      I modified my web.xml by adding

                      <servlet-name>Document Store Servlet</servlet-name>
                      <servlet-name>Document Store Servlet</servlet-name>
                      <servlet-name>Document Store Servlet</servlet-name>

      I modified my components.xml by adding

      under 'components'
      under schema locations
              http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.2.xsd
              http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel-2.2.xsd
      <excel:document-store use-extensions="true"/>

      I am using Maven2, added the dependency to the pom and ran mvn install, no errors


      And in my page added

                      <h:form id="excelReport">
                      ... columns...
                      <h:commandButton id="export" type="submit" value="Export to Excel" action="#{org.jboss.seam.excel.excelExporter.export('excelReport:authorizationListTable')}" />

      What could I possibly be missing?


        • 1. Re: Seam 2.2.1 CR1 & Excel
          ginni machamer Newbie

          More info. I searched for the class in Eclipse and noticed its packaging was different than how I had it, so I changed my button to this:

          <h:commandButton id="exporter" type="Submit" value="Export to Excel" action="#{org.jboss.seam.excel.exporter.excelExporter.export('excelReport:authorizationListTable')}" />

          and now I get this error:

          Caused by: javax.faces.el.EvaluationException: org.jboss.seam.excel.ExcelWorkbookException: Could not find data table with id excelReport:authorizationListTable

          So, I viewed the source of my page to make sure the rich datatable wasn't doing something strange, and I saw that my table's ID was indeed different.

          <table class="rich-table table" id="authorizationListForm:excelReport:authorizationListTable" style="border-top-width: 1px;" border="0" cellpadding="0" cellspacing="0" width="100%">...

          Then I modified my commandButton once again as is here:

          <h:commandButton id="exporter" type="Submit" value="Export to Excel" action="#{org.jboss.seam.excel.exporter.excelExporter.export('authorizationListForm:excelReport:authorizationListTable')}" />

          This works. I hope this helps someone else.