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
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 =
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
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
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
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
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.
-
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
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
9 matches
Mail list logo