I am using an IEngineService. I get an output stream from the response and use that to send the data. I don't know what PD4ML expects, but I'd hope it can take an OutputStream.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jul 27, 2009, at 1:49 PM, Nathan Beemer wrote:

I need to have a "Download as PDF" link on some of my pages that will render the given page to PDF and send to client.

I'm not familiar with iText, but everything you said sounds good, except the "blast out the data". My trouble is getting a handle on "the data".

I'm using PD4ML, but I can't hook onto the rendered Tapestry output to pipe into PD4ML.

Are you not using a IEngineService for this?




On Jul 27, 2009, at 10:35 AM, Norman Franke wrote:

I do this for PDF exporting from iText. I inject the (Http) request and (WebResponse) response along with a linkFactory via hivemind.xml. Then WebResponse.setHeader("Content-Description", "inline; attachment; filename=whatever"); Then just blast out the data to getResponse().getOutputStream().

Perhaps PageRenderSupport can't be used in services? What do you need it for?

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Jul 25, 2009, at 11:05 AM, Nathan Beemer wrote:

I want to direct the render of a Page to a specific OutputStream.

Is it possible to do this?


I'm trying to use an IEngineService to accomplish this. Seems I'm close, but getting:

"Component UClients/a requires rendering support, but no PageRenderSupport object has been stored into the request cycle. This object is typically provided by a Body component. You should add a Body component to your template."


I'm injecting RequestGlobals service into my Pages and then doing:

((AbstractMyPage) homePage).getRequestGlobals().store(builder);

But this doesn't seem to be what Tapestry is looking for during the render:

Stack Trace:
org .apache .tapestry.TapestryUtils.getPageRenderSupport(TapestryUtils.java:124) org .apache .tapestry .dojo .form.DropdownDatePicker.renderFormWidget(DropdownDatePicker.java: 120) org .apache .tapestry .dojo .form .AbstractFormWidget.renderFormComponent(AbstractFormWidget.java:66)





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


Reply via email to