0 Replies Latest reply on Feb 27, 2011 10:05 AM by vata2999

    Excel Exporter problem

    vata2999

      Hi guys,
      I created a simple list and after i wanted to export it to excel i faced this exception



      18:30:48,238 FATAL [application] org.jboss.seam.excel.ExcelWorkbookException:
      
       A worksheet's value must be an Iterable, DataModel or Query
      
      javax.faces.el.EvaluationException: org.jboss.seam.excel.ExcelWorkbookException: 
      
      A worksheet's value must be an Iterable, DataModel or Query



      Code



      public List<Movie> movies;
      public String doSearch() {
                
                
                FullTextQuery query;
                try {
                     query = searchQuery(searchQuery);
                     movies = query.getResultList();
                } catch (ParseException pe) {
                     return null;
                }
                
                //System.out.println(query.getResultSize());
                
                return null;
      
           }
      
      



      .xhtml



      <h:form id="excelExportMovie">
      <rich:dataTable id="movieTable">
      ..
      </rich:dataTeble>
      <h:commandLink action="#{excelExporter.export('excelExportMovie:movieTable')}" >
                     <h:graphicImage value="/img/spreadsheet.png" />
                </h:commandLink>
      </h:form>
      


      any help appreciated
      Thanks in advanced