RE: Outputting text file

2006-08-15 Thread Jesse Alexander \(KSFD 121\)
If you do not like to write it yourself - check out weblets... regards Alexander -Original Message- From: Eurig Jones [mailto:[EMAIL PROTECTED] Sent: Monday, August 14, 2006 3:25 PM To: MyFaces Discussion Subject: Re: Outputting text file I've now decided to go with a simple

Re: Outputting text file

2006-08-15 Thread Mike Kienenberger
No, this is really simple as an action method. Why make it any harder than this? public void exportFileAction(String contentType, byte[] data, String filename) throws IOException { FacesContext facesContext = FacesContext.getCurrentInstance(); OutputStream responseStream =

RE: Outputting text file

2006-08-14 Thread Conway. Fintan \(IT Solutions\)
Hi Eurig, Try the following : http://wiki.apache.org/myfaces/Setup_For_File_Uploads Regards, Fintan -Original Message- From: Eurig Jones [mailto:[EMAIL PROTECTED] Sent: 14 August 2006 09:57 To: users@myfaces.apache.org Subject: Outputting text file I have a link on a facelets page

Re: Outputting text file

2006-08-14 Thread Eurig Jones
Sorry, but I'm not too sure how this relates to my problem Conway. Fintan (IT Solutions) wrote: Hi Eurig, Try the following : http://wiki.apache.org/myfaces/Setup_For_File_Uploads Regards, Fintan -Original Message- From: Eurig Jones [mailto:[EMAIL PROTECTED] Sent: 14 August 2006

Re: Outputting text file

2006-08-14 Thread Dmitry Y. Shyshkin
Make jsp page that will return file content. pageThatReturnFile.jsp %@ page contentType=... % f:view h:outputText value=#{...} escape=false/ /f:view And simply provide link to this page. I have a link on a facelets page which I want to users to be able to click and download a text file

Re: Outputting text file

2006-08-14 Thread Eurig Jones
Then you won't have the right file extension. Dmitry Y. Shyshkin wrote: Make jsp page that will return file content. pageThatReturnFile.jsp %@ page contentType=... % f:view h:outputText value=#{...} escape=false/ /f:view And simply provide link to this page. I have a link on a facelets

Re: Outputting text file

2006-08-14 Thread Gert Vanthienen
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. -

Re: Outputting text file

2006-08-14 Thread Ondřej Světlík
Eurig Jones napsal(a): 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

Re: Outputting text file

2006-08-14 Thread Eurig Jones
I've now decided to go with a simple servlet because I think it's a cleaner method to do it. Thanks a lot for everyones help! Ondřej Světlík wrote: Eurig Jones napsal(a): 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