Hi,

I haven't seen a web application that shows progress bar for download.
The browser itself shows such information - Google Chrome in the
bottom-left corner, Firefox in its download window/manager.


On Sat, Nov 16, 2013 at 11:40 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
>
> 1-Replace the download link by an AJAX link.
> 2-Launch file generation on a background thread. Pass a class to this
> thread that serves as context fro passing information from generating
> thread with web threads (keeping a reference to thisi context on the page).
> 3-Make a progress panel visible + an AJAX timer that pols the server for
> progress.
>

Point 3) won't work if the file download is from a resource linked to the
page. And it is thru DownloadLink.
In this case the ajax timer won't be able to reach the page at all.

The app should use a mounted/shared resource.
see wicket-extensions' UploadProgressBar and/or follow the progress of
https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/262 for example. Both
are related to *upload*, not download.


> 4-Once file is generated replace progress panel with a download link (or
> use trick in [1] to trigger file dowmload)
>
> References
>
> 1-
>
> https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
>
>
> On Sat, Nov 16, 2013 at 10:29 AM, seyaw <seidy...@gmail.com> wrote:
>
> > Hi All,
> > I have a wicket DownloadLink where I generate file dynamically and
> download
> > it. It works.
> > The process of dynamic File generation might take some time and like to
> > show
> > ProgressBar which show how much the generation has progressed. How Can I
> do
> > that.
> >
> > I am using wicket 1.5.8
> > Thank you very much.
> >
> >  add(new DownloadLink("export", new LoadableDetachableModel<File>()
> >         {
> >             private static final long serialVersionUID =
> > 840863954694163375L;
> >
> >             @Override
> >             protected File load()
> >             {
> >                 File exportTempDir = getGeneratedFile();
> > }
> > }
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/DownloadLink-and-ProgressBar-tp4662451.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>

Reply via email to