Re: Download Link doesn't work on 1.5.x
no question, *I replaced:* Link link = new Link("download"){ @Override public void onClick() { IResourceStream stream = new FileResourceStream(new File(path + fileName)); getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceStreamRequestHandler(stream).setFileName(fileName)); . *with* new DownloadLink("download", new File(path + fileName)) tnk -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309595.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
Re: Download Link doesn't work on 1.5.x
On Thu, Jan 19, 2012 at 10:33 AM, ricmancio wrote: > thanks for the suggestion, but now it works That's good, no ? Is there a question below ? > > also from the documentation: > > *https://cwiki.apache.org/WICKET/migration-to-wicket-15.html* > > *Redirect to non wicket or external page* > > suggests replacing old code : > * > getRequestCycle().setRequestTarget(new > RedirectRequestTarget("/usage.html"));* > > with: > > *getRequestCycle().scheduleRequestHandlerAfterCurrent(new > RedirectRequestHandler("/usage.html"));* > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309548.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Download Link doesn't work on 1.5.x
thanks for the suggestion, but now it works also from the documentation: *https://cwiki.apache.org/WICKET/migration-to-wicket-15.html* *Redirect to non wicket or external page* suggests replacing old code : * getRequestCycle().setRequestTarget(new RedirectRequestTarget("/usage.html"));* with: *getRequestCycle().scheduleRequestHandlerAfterCurrent(new RedirectRequestHandler("/usage.html"));* -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309548.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
Re: Download Link doesn't work on 1.5.x
See the source code of DownloadLink On Thu, Jan 19, 2012 at 10:06 AM, ricmancio wrote: > In Wicket 1.4.x I used > > Link link = new Link("download"){ > > @Override > public void onClick() { > > *IResourceStream stream = new FileResourceStream(new File(path + > fileName)); > getRequestCycle().setRequestTarget(new > ResourceStreamRequestTarget(stream) > .setFileName(fileName));* > } > }; > * > After migration on 1.5.x what code should I use?* > > I'm trying with: > > > *getRequestCycle().scheduleRequestHandlerAfterCurrent(new > ResourceStreamRequestHandler(stream) > .setFileName(fileName));* > > ... > but doesn't work > > tnk > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309507.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Download Link doesn't work on 1.5.x
In Wicket 1.4.x I used Link link = new Link("download"){ @Override public void onClick() { *IResourceStream stream = new FileResourceStream(new File(path + fileName)); getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(stream) .setFileName(fileName));* } }; * After migration on 1.5.x what code should I use?* I'm trying with: *getRequestCycle().scheduleRequestHandlerAfterCurrent(new ResourceStreamRequestHandler(stream) .setFileName(fileName));* ... but doesn't work tnk -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309507.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