Seam 2.2.1 CR1 & Excel
ginni Nov 17, 2010 10:04 AMI 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> <servlet-name>Document Store Servlet</servlet-name> <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Document Store Servlet</servlet-name> <url-pattern>*.csv</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Document Store Servlet</servlet-name> <url-pattern>*.xls</url-pattern> </servlet-mapping>
I modified my components.xml by adding
under 'components' xmlns:excel="http://jboss.com/products/seam/excel" xmlns:document="http://jboss.com/products/seam/document" 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 and <excel:document-store use-extensions="true"/>
I am using Maven2, added the dependency to the pom and ran mvn install, no errors
<dependency> <groupId>org.jboss.seam</groupId> <artifactId>jboss-seam-excel</artifactId> <version>2.2.1.CR1</version> <scope>provided</scope> </dependency>
And in my page added
<h:form id="excelReport"> <rich:dataTable width="100%" var="record" id="authorizationListTable" value="#{authorizationList}" ... ... columns... </rich:dataTable> <h:commandButton id="export" type="submit" value="Export to Excel" action="#{org.jboss.seam.excel.excelExporter.export('excelReport:authorizationListTable')}" /> </h:form>
What could I possibly be missing?
Thanks,
Ginni