We have a dynamically generated PDF we send to the user.
I figured out a way to do it, but while it works, it produces lots of stacktraces in wicket:

I created a PdfResource as subclass of ByteArrayResource.
When the user clicks the button, in the onClick() method we do:

PdfResource pdfResource = new PdfResource(data);
Attributes attrs = new Attributes(requestCycle.getRequest(), requestCycle.getResponse());
pdfResource.respond(attrs);

This works so far, except that wicket doesn't know the response has already been sent and tries to display the same page again - I somehow have to stop processing the response, but how do I do that? In Wicket 1.4 I could just throw an AbortException() which did just that. How do I do that in Wicket 1.5 ?

Thanks
Matt

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to