Try putting @DefaultHandler on the event handler that you want to be
the default for the Action Bean.

Cheers,
Freddy

On Fri, 26 Mar 2010 13:21:38 +0000 (UTC), "Daniel Cane"
<daniel.c...@gmail.com> said:
> 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&#174; 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
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Download Intel&#174; 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
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to