Great, thanks! onActivate does the trick.

Jens


-- 
Jens Reufsteck
Marketing & Online Director

Staufenbiel Institut GmbH
Events & Recruiting Solutions

Wildunger Straße 6, 60487 Frankfurt am Main
www.staufenbiel.de www.mba-master.de www.absolventenkongress.de

Tel.:  +49 (0)69 25537-140
Fax:   +49 (0)69 25537-2140

Geschäftsführer: Judith Oppitz, Birgit Giesen, Graham Storey, Martin Halliday
Amtsgericht Köln HRB 9301

Internet communications are not secure and therefore Staufenbiel Institut GmbH 
does not accept legal responsibility
for the contents of this message. Any views or opinions presented are solely 
those of the author and do not
necessarily represent those of Staufenbiel Institut GmbH unless otherwise 
specifically stated.

> -----Original Message-----
> From: Adam Zimowski [mailto:zimowsk...@gmail.com]
> Sent: Wednesday, April 06, 2011 4:34 PM
> To: Tapestry users
> Subject: Re: Page returning pdf
> 
> And of course the PDFStreamResponse can be found on the wiki, along
> with the entire example:
> 
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF
> 
> Adam
> 
> On Wed, Apr 6, 2011 at 9:32 AM, Adam Zimowski <zimowsk...@gmail.com> wrote:
> > This this instead of @SetupRender:
> >
> > @OnEvent(EventConstants.ACTIVATE)
> > StreamResponse onActivate() {
> >  InputStream myPdfStream = // build your pdf....
> >  return new PDFStreamResponse(myPdfStream,"MyPDF");
> > }
> >
> > On Wed, Apr 6, 2011 at 9:16 AM, Jens Reufsteck
> > <jens.reufst...@staufenbiel.de> wrote:
> >> I’m trying to call a page, that returns a dynamically generated pdf instead
> >> of html. No problem with component events. But I just want to call 
> >> something
> >> like www.mydomain.de/example.pdf.
> >>
> >> What I've tried is:
> >>
> >>        public boolean setupRender() throws IOException {
> >>
> >>                ...
> >>
> >>                OutputStream out =
> >> response.getOutputStream("application/pdf");
> >>
> >>                pdfService.getCvPdf(
> >>                        out,
> >>                        veraid,
> >>                        sid);
> >>
> >>                out.flush();
> >>
> >>                // skip render process
> >>                return false;
> >>        }
> >>
> >> But this results in an exception "Page xy did not generate any markup when
> >> rendered".
> >>
> >> I understand, that this is probably not exactly, what Tapestry pages are
> >> for. But I wanted to avoid something more complex like writing a pdf
> >> dispatcher ...
> >>
> >> Thanks for any hint
> >> Jens
> >>
> >> --
> >> Jens Reufsteck
> >> Marketing & Online Director
> >>
> >> Staufenbiel Institut GmbH
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to