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.
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.
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.
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? ;-)
I like where you're going with this...
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 method
public 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.