You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nicholas Lesiecki <nl...@vmsinfo.com> on 2004/09/17 02:12:47 UTC

Generating Emails Using Tapestry

Hello all,

 

After reading the following excellent article
(http://www.behindthesite.com/blog/C1931765677/E2094832857/) I decided that
I'd like to generate my site's emails using tapestry. However, I would (in
the future) like to be able to initiate a tapestry-based email from deep
within my domain code, potentially far from a Servlet's request/response.
How tightly is tapestry bound to these context objects (which, of course,
are mediated by the requestCycle)?

 

Ideally I'd like to be able to do something like:

 

IPage page = getPageWithoutRequestCycle(servletContext);

page.renderPage(someWriter, null);//no cycle

String body = getContentsOf(someWriter);

//send body

 

I know that this is not the normal mode of operation, but is there some set
of hacks or overrides (not too sleazy) that will free Tapestry of its
dependence on a *specific* request and allow programmatic generation of
pages?

 

Cheers,

nick