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)



Reply via email to