3 Replies Latest reply on Mar 16, 2009 11:19 AM by Ilya Shaikovsky

    Rich table Display in excel sheet..

    aboo salimon Newbie

      hi i am working in report generation.....
      i would like to generate richdata table in excel sheet how can i achieve this...
      please explain in breif... im using seam 2.1.1 with richfaces...

        • 1. Re: Rich table Display in excel sheet..
          Ilya Shaikovsky Master

          use apache POI to generate excel file from your dataModel.

          • 2. Re: Rich table Display in excel sheet..
            Jai Naga Rani Kasirajan Newbie

            I am also facing problems in Excel download
            I am trying to export of xls file.

            I am using jboss seam 2.1.1 GA

            1) I am having jboss.seam-excel.jar & jxl.jar.

            2)In Components.xml

            <components xmlns:excel="http://jboss.com/products/seam/excel"
            xmlns:document="http://jboss.com/products/seam/document"
            xsi:schemaLocation= http://jboss.com/products/seam/excel http://jboss.com/products/seam/excel/excel-2.1.xsd
            http://jboss.com/products/seam/document http://jboss.com/products/seam/document-2.1.xsd">

            when i used
            <excel:document-store use-extensions="true"/>
            I got deployment Exception.
            so changed to
            <document:document-store use-extensions="true"/>

            3) In web.xml


            <servlet-name>Document Store Servlet Excel</servlet-name>
            <servlet-class>org.jboss.seam.excel.DocumentStoreServlet</servlet-class>


            <servlet-mapping>
            <servlet-name>Document Store Servlet Excel</servlet-name>
            <url-pattern>*.xls</url-pattern>
            </servlet-mapping>


            <context-param>
            <param-name>webAppRootKey</param-name>
            <param-value>seam-excel</param-value>
            </context-param>

            4) In jboss-web.xml

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE jboss-web PUBLIC
            "-//JBoss//DTD Web Application 4.2//EN"
            "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">

            <jboss-web>
            <class-loading java2ClassLoadingCompliance="false">
            <loader-repository>
            seam.jboss.org:loader=seam-excel
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
            </loader-repository>
            </class-loading>
            </jboss-web>

            5) In Jsp
            <h:commandButton id="export_top" type="submit" value="Export to Excel" action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}" />


            20:26:43,250 ERROR [application] javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:95)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
            at javax.faces.component.UICommand.broadcast(UICommand.java:387)
            at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
            at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
            at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
            at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
            at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
            at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
            at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:70)
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
            ... 51 more
            20:26:43,250 WARN [lifecycle] #{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            javax.faces.FacesException: #{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
            at javax.faces.component.UICommand.broadcast(UICommand.java:387)
            at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
            at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
            at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
            at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
            at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
            at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
            at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
            at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
            at java.lang.Thread.run(Thread.java:619)
            Caused by: javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:95)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
            ... 50 more
            Caused by: javax.el.PropertyNotFoundException: /miscellaneous/addressbook.jsp @56,164 action="#{org.jboss.seam.excel.exporter.ExcelExport.export('addresslist','jxl')}": Property 'ExcelExport' not found on type org.jboss.seam.Namespace
            at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:70)
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
            ... 51 more

            • 3. Re: Rich table Display in excel sheet..
              Ilya Shaikovsky Master

              a question for seam forum..