Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Page Method for Stream Response to Pagelink

$
0
0
I am trying to stream PDF in response to a pagelink, NOT submit button as in:
http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile

In the above wiki, the method used is "onSubmit"...what would be the corresponding method for pagelink. 

// what method should be used instead of onSubmit to capture pagelink request to this page?

public StreamResponse onSubmit()

  // Create PDF
  InputStream is = PDFGenerator.generatePDF("This is the content of a Dynamically Generated PDF");
  // Return response
  return new PDFStreamResponse(is,"MyDynamicSample");

I already tried onAction, onPassivate, etc as per these references:

http://tapestry.apache.org/page-navigation.html#PageNavigation-Pageactivation
(Pattern 3: Render Requests Only)
http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/whatiscalledandwhen
(render request)

Viewing all articles
Browse latest Browse all 5648

Trending Articles