I don't know 4.1, but if you provide a Response and replace the
outputstream, you'll likely get what you want.  You'll just have to
ensure the headers don't get sent, but I believe that is a method you
can overload in the Response.

--sam


On 12/7/06, Dave Kallstrom <[EMAIL PROTECTED]> wrote:
In tapestry versions prior to 4.1 we rendered email message using tapestry
with the following code.

BaseHTMLMessagePage sendPage = (BaseHTMLMessagePage) getHtmlPage(inner);
ByteArrayOutputStream out = new ByteArrayOutputStream();
IMarkupWriter writer = new MarkupWriterImpl("text/html", new
PrintWriter(out), new AsciiMarkupFilter());
inner.activate(sendPage);
inner.renderPage(writer);
writer.flush();
subjectAndBody[0] = sendPage.getSubject();
subjectAndBody[1] = out.toString();
inner.cleanup();
getRequestGlobals(cycle).store(cycle);

After recently upgrading to 4.1 this method no longer works.
RequestCycle.renderPage no longer takes an IMarkupWriter but requires a
ResponseBuilder. I've tried the DefaultResponseBuilder which seems to want
to write to the WebResponse instead of the IMarkupWriter that I send it. My
question is how best to make this work again? Do I need to implement a new
ResponseBuilder somehow or extend the DefaultResponseBuilder? Or is there a
better way to render tapestry pages for html email?
--
Dave Kallstrom



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to