Hi,
On Thu, Jul 25, 2013 at 4:35 PM, rjjvandenberg <rjjvandenb...@gmail.com>wrote: > I want the user to download a generated file, depending on the form > content, > with a submit button. > > This is how I add the button to the form: > <code> > Button downloadInvoicesButton = new Button("download") { > @Override > public void onSubmit() { > getRequestCycle().replaceAllRequestHandlers( > new ResourceReferenceRequestHandler( > new > ZippedDocumentsResourceReference("Blahblah.zip", documentModel) > )); > }; > }; > form.add(downloadInvoicesButton); > </code> > > This works, however, the filename and MIME type are incorrect: the response > header is not set accordingly. I would expect that to be done by the > ResourceReference (ZippedDocumentsResourceReference extends > ResourceReference). > > Is my assumption incorrect or is this a bug? Can anyone explain why this is > not working? > Yes, the headers should be set by ZippedDocumentsResourceReference, but this reference is not coming with Wicket distro, so you should debug it yourself. > > Thanks, > > Roy > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Response-header-is-not-set-by-the-resourcereference-when-changing-the-request-handler-tp4660487.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 > >