You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ian Godman <ia...@yahoo.co.uk> on 2007/09/26 12:48:18 UTC
File downloading with Wicket
Can any one give me a pointer or 2 on how to download a file from a wicket page?
I have a LinkTree representing a directory tree which is lazy loaded via ajax. When the user clicks on a file node I need to download the file to them. However the file is stored with a different name (allows for versioning etc) so it needs to arrive at the browser as a file with the name as displayed in the tree not as saved on the hard disk.
This was previously implemented in a Tapestry system using a servelet but I just cant get my head around the issues of using a servlet in Wicket (does not seem the right way to me).
Any help in clearing the fog most appreciated, example code even more so
Ian
___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/
Re: File downloading with Wicket
Posted by Roland Kaercher <ic...@rolandkaercher.de>.
Hello Ian,
I think DownLoadLink (
http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/markup/html/link/DownloadLink.html
) is what you need.
Regards,
Roland
On 9/26/07, Ian Godman <ia...@yahoo.co.uk> wrote:
> Can any one give me a pointer or 2 on how to download a file from a wicket page?
>
> I have a LinkTree representing a directory tree which is lazy loaded via ajax. When the user clicks on a file node I need to download the file to them. However the file is stored with a different name (allows for versioning etc) so it needs to arrive at the browser as a file with the name as displayed in the tree not as saved on the hard disk.
>
> This was previously implemented in a Tapestry system using a servelet but I just cant get my head around the issues of using a servlet in Wicket (does not seem the right way to me).
>
> Any help in clearing the fog most appreciated, example code even more so
>
>
> Ian
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
> now.
> http://uk.answers.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: File downloading with Wicket
Posted by Vit Rozkovec <wi...@rozkovec.info>.
There is a DownloadLink for this scenarion.
Vitek
Ian Godman wrote:
> Can any one give me a pointer or 2 on how to download a file from a wicket page?
>
> I have a LinkTree representing a directory tree which is lazy loaded via ajax. When the user clicks on a file node I need to download the file to them. However the file is stored with a different name (allows for versioning etc) so it needs to arrive at the browser as a file with the name as displayed in the tree not as saved on the hard disk.
>
> This was previously implemented in a Tapestry system using a servelet but I just cant get my head around the issues of using a servlet in Wicket (does not seem the right way to me).
>
> Any help in clearing the fog most appreciated, example code even more so
>
>
> Ian
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
> now.
> http://uk.answers.yahoo.com/
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: File downloading with Wicket
Posted by Andrew Klochkov <a....@webalta-team.com>.
Have a look at the DownloadLink class
Ian Godman wrote:
> Can any one give me a pointer or 2 on how to download a file from a wicket page?
>
> I have a LinkTree representing a directory tree which is lazy loaded via ajax. When the user clicks on a file node I need to download the file to them. However the file is stored with a different name (allows for versioning etc) so it needs to arrive at the browser as a file with the name as displayed in the tree not as saved on the hard disk.
>
> This was previously implemented in a Tapestry system using a servelet but I just cant get my head around the issues of using a servlet in Wicket (does not seem the right way to me).
>
> Any help in clearing the fog most appreciated, example code even more so
>
>
> Ian
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
> now.
> http://uk.answers.yahoo.com/
>
--
Andrew Klochkov
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org