Forums Register Login

Download files component

+Pie Number of slices to send: Send
Hi,
Is there a component/sample code to download files from a web page using JSF?

Please advice
+Pie Number of slices to send: Send
 

Originally posted by Mary Cole:
Hi,
Is there a component/sample code to download files from a web page using JSF?

Please advice



Off hand, assuming I understand your request, I know of two such components. One is my own download component in the Mojarra Scales project: https://scales.dev.java.net/#download with a live demo here: http://jsftemplating.org/mojarra-scales-demo-facelets/download.jsf

RichFaces/Ajax4Jsf also offers a4j:mediaOutput: http://labs.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/RichFacesComponentsLibrary.html (section 6.12) and a live demo of that here: http://livedemo.exadel.com/richfaces-demo/richfaces/mediaOutput.jsf
+Pie Number of slices to send: Send
I didn't get much info from both the sites...actually, I have a filename (.pl or .zip , or .doc) with a hyperlink ( a command link ) to it on the web page..on click of the link, it should call the method on the bean to get the file contents and display the save open dialog box so that the user can view or downlad the file.. if possible I would prefer not to refresh the page..Ajaxit

any suggestions?

[ March 25, 2008: Message edited by: Mary Cole ]
[ March 25, 2008: Message edited by: Mary Cole ]
+Pie Number of slices to send: Send
Hi,
i dont think you need any special components to acheive this functionality.
You can use the link as a commandLink and call a method which does the following


You need to write your own custom methods whereever applicable in the above scenario.

Thanks,
Ketan.
Do not set lab on fire. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 16386 times.
Similar Threads
Not able to compile servlet
Upload and Download file to https
downloading a file from server
how can i send email without email account
Suggestions for displaying files from database
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:03:02.