Eurig,

One way to do this, is by writing a custom PhaseListener. There are some examples available on the web for serving static resources this way, but you can easily adapt these examples to serve the contents of your managed bean property as a CSV.
- http://www.jroller.com/page/mert?entry=js_css_img_loading_resources
- https://blueprints.dev.java.net/bpcatalog/ee5/ajax/phaselistener.html

You might want to consider to start using Apache Shale's Remoting support. If you write your own Processor implementation and configure it as shown on http://shale.apache.org/shale-remoting/apidocs/org/apache/shale/remoting/package-summary.html, the Shale framework will do the rest.

Regards,

Gert Vanthienen

Eurig Jones wrote:
I have a link on a facelets page which I want to users to be able to click and download a text file (with it's own extension such as .csv). The contents of this text file is simply the contents of a String property in a jsf bean.

I'm not sure how to go about doing the above, I'm not even sure if it's possible using JSF. Any ideas?

Regards,
Eurig

Reply via email to