I've tried this example and it works quite well. But I have now another
problem. I.e.: after I've saved the file and close the download dialog. It
doesn't change to another xhtml-page (assumed downloadOK.xhtml. See my code
shown as follow). It stay by myJSF.xhtml.
Who knows why?
Thanks
Thomas
...
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download"
action="#{fileBean.fileDownload }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
...
return "downloadOK"
}
...
faces-config.xml
*******************
<navigation>
<from>downloadOK</from>
... <to>downloadOK.xhtml</to>
</navigation>
...
Adrian Mitev <[EMAIL PROTECTED]> schrieb:
See here - http://wiki.apache.org/myfaces/Sending_Files
2007/1/26, Thomas Chang <[EMAIL PROTECTED] >: Hi,
My code look as follow. What I want to do is: I generate a file in run-time and
put it under a dir in server-side, assumed under "c:\temp\myfile.txt". If one
clicks the commmanlink, a pop-up dialog for file-download will be shown and one
can chose a dir in local to save the file. I wonder if I can use my following
code to do so. And I want to know how can I write the function fileDownlaod()
in my backing bean.
Or one can do this in an other way?
Thanks
Thomas
myJSF.xhtml
*************
...
<t:commandLink id="csvDownload" value="File download"
action="#{fileuploadBean.fileDownload }" immediate="true"></t:commandLink>
...
MyBean.java
*************
...
fileDownload(){
}
...
---------------------------------
Besseren Schutz gegen Spam - jetzt bei dem neuen Yahoo! Mail .
---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever
hilft Ihnen.