Greets,
I have an ActionBean with multiple Resolutions - one of which is a
StreamingResolution to send a PDF to the client. That part works fine - the
browser correct prompt the client to Save / Open; however, the next request on
the browser page (if it's to the same ActionBean) results in an error:
Multiple event parameters [printVisitRx, printCMSForm] are present in this
request. Only one event parameter may be specified per request
That same action works fine if I don't first do the action with the
StreamingResolution. So -- how do I break the confusion? Is there something I
need to tell Stripes after the stream so that it's ready for the next request?
My code snippet:
public Resolution printVisitRx()
{
return new
RedirectResolution(PrintVisitRxActionBean.class).addParameter("pid",
getPid()).addParameter("vid", getVid());
}
public Resolution printCMSForm()
{
ByteArrayOutputStream baosMergedVisit =
Cms1500.mergeVisit(getVisit());
ByteArrayInputStream bois = new
ByteArrayInputStream(baosMergedVisit.toByteArray());
StreamingResolution res = new
StreamingResolution("application/pdf", bois)
{
protected void stream(HttpServletResponse response)
throws Exception
{
response.setCharacterEncoding( null );
super.stream(response);
}
}.setFilename(getVisit().getPatient().getMrn()+"-"+
getVisit().getVisitDate().getTime() +".pdf");
return res;
}
Thanks team!
Dan
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users