Yeah, I was aware of tapx-templating, but I seem a little confused about
its purpose. The GitHub readme states that it's for generating offline
content, which an email kinda is, but not quite as I need the html email to
point to all of the resources of the running app (e.g. logos, etc). One of
the important things that I was using the tapestry link generation API was
to generate links to pages in my application; however, if I somehow run it
from a different context, that wouldn't work so well either.

I remember from past discussions on the mailing list that tapx-templating
cannot be run inside the same application and that it needs a separate web
application context, which is not the case for what I need it for ( and I
don't see myself creating a separate app just to render email).  At the
same time, looking at one of the integration tests (
https://github.com/hlship/tapx/blob/master/tapx-templating/src/test/java/com/howardlewisship/tapx/templating/integration/SendMail.java)
it seems like I could create a package in my app that would hold these
resources (e.g. the equivalent of the 'src/test/context.2') and then
instantiate the TemplateAPI from within my message queue processing (e.g.
TemplateAPI templateAPI = new TemplateAPI("app2", new File(
"src/test/context.2")); ) . Would that mess up the registry of the main
application ? But then, the new registry wouldn't be aware of my existing
application's pages, and it wouldn't work again to generate links to them..

I know that in the past, people have resorted to just slurping in the
output of actually calling an actual tapestry page that would render the
content of the email. For some reason, it seems that it shouldn't be so
hard to dummy up a request and make tapestry output what it would have
otherwise output to the http response (but obviously, it's not easy, since
nobody has been able to crack this problem, and even tapx-templating needs
a separate context).

Cheers,

Alex K
On Sat, Sep 29, 2012 at 3:55 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Sat, 29 Sep 2012 12:01:40 -0300, Alex Kotchnev <akoch...@gmail.com>
> wrote:
>
>   It would have been cool if there was something that allowed generating
>> links and/or rendering tapestry templates in a non-web context (e.g.
>> Grails has a GSP page renderer
>> http://mrhaki.blogspot.com/**2012/03/grails-goodness-**
>> render-gsp-views-and.html<http://mrhaki.blogspot.com/2012/03/grails-goodness-render-gsp-views-and.html>
>> )
>>
>
> Have you tried tapestry-templating from https://github.com/hlship/tapx**?
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to