-
30. Re: export to pdf or excel from rich:dataTable
danielc.roth Oct 27, 2008 11:19 PM (in response to infinity2heaven)Ted: The 2.0 code posted in the beginning of this thread is sort of out of date. Nicklas har made major improvements since then, as well as bug fixes.
It's not that hard to make the current trunk code (2.1.X) compatible with Seam 2.0. What you need to do is
1) Check out (from svn) or download the Excel module source
2) Copy the DocumentDataStore(?) from the pdf-2.0-src to the excel module src. It is really not that problematic.
3) Maybe do some small
naming
fixes. (pdf->excel)If many people request this (there have been 2 so far) I might do it myself, if I get the time. But this will be incredible unsupported.
-
31. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 28, 2008 12:42 AM (in response to infinity2heaven)Thanks, Daniel. I'll try it. Where's the best place to download Seam 2.1 Excel module source?
-
32. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 28, 2008 2:33 PM (in response to infinity2heaven)I've downloaded the source as posted, but in comparing the source to the class files in the jboss-seam-excel-20080730.jar, I noticed that there are some classfiles that don't have corresponding source files in the source. Can I safely ignore them? They are:
Template.class
Validation.class
(plus an inner class for each of these)Thanks,
Ted
-
33. Re: export to pdf or excel from rich:dataTable
nickarls Oct 28, 2008 2:42 PM (in response to infinity2heaven)There has been a lot of changes. Take the 2.1 source and drop the entire excel package into the 2.0 source tree in the same place and fix the DocumentStore...
-
34. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 28, 2008 3:46 PM (in response to infinity2heaven)Thanks, Niklas. I've got one error, in UIWorkbook (line 331): The method setFilename(String) is undefined for the type DocumentData. Should I create a setter on DocumentData that just sets the basename, or should I just comment out that line in UIWorkbook?
-
35. Re: export to pdf or excel from rich:dataTable
nickarls Oct 28, 2008 4:11 PM (in response to infinity2heaven)Comment it out.
-
36. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 29, 2008 9:06 PM (in response to infinity2heaven)I have placed the excel 2.1 source code in 2.0, and have fixed the DocumentStore pdf references. I have also defined the DocumentStoreServlet in web.xml. Additionally, I have added necessary component entries to faces-config, and have added the seam-excel.taglib.xml file to the project. However, when I go to my xhtml page that worked with the seam-excel-20080730.jar, I just get a blank page in the browser. I am not hitting the DocumentStoreServlet for some reason. Everything compiles fine.
I know this isn't something you want to support long term, but if you can think of any other configuration I may have missed, I'd appreciate it.
-
37. Re: export to pdf or excel from rich:dataTable
nickarls Oct 30, 2008 11:25 AM (in response to infinity2heaven)Stick some debugging in UIWorkbook.encodeEnd to see if it gets that far and where it's trying to go...
I'm not sure you need to put the DSS in web.xml for default cases (could that be the problem?)
-
38. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 30, 2008 3:44 PM (in response to infinity2heaven)Nope. not even getting to encodeEnd. I wonder--do I need to add a lifecycle reference to DocumentStorePhaseListener to my faces-config, like the pdf-2.0 facesConfig has?
-
39. Re: export to pdf or excel from rich:dataTable
nickarls Oct 30, 2008 10:51 PM (in response to infinity2heaven)Does it even make it to the encodeBegin? Compare the JAR contents with the old one attached to the JIRA.
-
40. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 31, 2008 2:43 PM (in response to infinity2heaven)So, I've finally gotten it to hit encodeEnd (had to set up my existing facesConfig properly to recognize the excel tags)--here's what I've got so far:
I have an s:link on a page callingchange-set.jsf
. I have an xhtml page calledchange-set.xhtml
with a rudimentary set of workbook tags that I want to be in excel spreadsheet form. My pages.xml has an entry forchange-set.xhtml
that simply defines a param that I'm passing in via my s:link.
When I click the link, I get a page not found error. The url at this point ischange-set.xls
-
41. Re: export to pdf or excel from rich:dataTable
danielc.roth Oct 31, 2008 3:09 PM (in response to infinity2heaven)What is your url pattern in the document store servlet? (web.xml) It looks like you haven't got *.xls in there.
-
42. Re: export to pdf or excel from rich:dataTable
jenkinsjava Oct 31, 2008 3:29 PM (in response to infinity2heaven)Thanks Daniel! That was it!! But explain something to me, just 'cause I'm curious: the Jira jar file from July worked with no web.xml tweaking on my part. Why?
-
43. Re: export to pdf or excel from rich:dataTable
danielc.roth Nov 2, 2008 9:15 PM (in response to infinity2heaven)I have no idea :-)
It would be cool if you posted a blog or eqiv with the 2.0.X-working jar. Some people probably would be very happy
-
44. Re: export to pdf or excel from rich:dataTable
nickarls Nov 2, 2008 9:45 PM (in response to infinity2heaven)My summary would be
- Don't use explicit DocumentStore in web.xml (that way you don't have to do the *.xls mapping)
- Use the full name that is on the ExcelExporter component (packages might have changed)
The alias is defined somewhere(tm) on higher level, can't remember where.