-
1. Re: Enabling generic export or print features with Seam
www.supernovasoftware.com May 22, 2008 6:15 PM (in response to chris.simons)I would like this as well.
While the new excel support look really cool, it still requires that a page be made for each export AFAIK.
Something like http://displaytag.sourceforge.net/11/ would be quite useful.
-
2. Re: Enabling generic export or print features with Seam
mcoffin May 22, 2008 6:26 PM (in response to chris.simons)The MyFaces Project has an ExportActionLister you could probably look in to.
-
3. Re: Enabling generic export or print features with Seam
chris.simons May 22, 2008 6:59 PM (in response to chris.simons)Jason - that is exactly what I had in mind when I posted my message. Thanks for following-up.
Mark - this seems promising. Thank you for bringing it to my attention and it's great to receive some quick responses.
I'll be researching this project and will report back with my findings.
Thanks!
-
4. Re: Enabling generic export or print features with Seam
chris.simons May 22, 2008 9:17 PM (in response to chris.simons)ExporterActonListener (formally exportToExcel?) seems to work only with standard JSF data tables. It seems promising.
However, I guess I'm still looking for advice on proceeding from the DataModel standpoint rather than extracting HTML from a dataTable.
Any suggestions?
Thanks.
-
5. Re: Enabling generic export or print features with Seam
nickarls May 22, 2008 9:45 PM (in response to chris.simons)Hmm, wonder if it would be possible to write a layer for the excel component that would dig out the datatable component, use the same binding for data access and translate the css into compatible layout instructions?
David? Or are you too busy watching the European Song Competition semi? ;-)
-
6. Re: Enabling generic export or print features with Seam
chris.simons May 22, 2008 10:32 PM (in response to chris.simons)I like where you're going with this...
-
7. Re: Enabling generic export or print features with Seam
nickarls May 26, 2008 10:08 AM (in response to chris.simons)Continued the discussion here
-
8. Re: Enabling generic export or print features with Seam
nickarls May 27, 2008 8:02 AM (in response to chris.simons)I think it might be a good idea to have some general export functionality layer.
Say, we have a component that is called
exporter
. It would have a single methodpublic void export(String componentId, String format);
An implementation would then dig out the component based on the ID and render it how it seems fit. In that way you could get a csv dump of a commandButton or perhaps something even more useful.
There would be some pre-defined renderers (excel, csv, pdf, jpg) or then you could render your own (OK, add one method to exporter:
public void registerExporter(String format, String componentName);
This could be wrapped up in custom tag that would display a list of icons for the registered type (icon provided by implementation) or called separately through links etc wherever you need them.
Of course, client side state saving might be a problem(?)
Just brainstorming, someone more knowledgeable is free to join in.
-
9. Re: Enabling generic export or print features with Seam
nickarls May 27, 2008 8:14 AM (in response to chris.simons)Created a JIRA for this.