On 2010/05/22 0:24, Lincoln Baxter, III wrote:
I think for now these should be the same module. "Seam
Docs" -- There's
also been speculation on whether a Mock Framework could be used to
boot-up JSF and render documents.
Email is not really a document. It is a message, see below.
http://community.jboss.org/wiki/MockObjectsforTestDrivenJSFDevelopmentorg...
Another alternative is to build a UIViewRoot,...
Or.. there's the possibility of simply creating a "fake" Request...
All of those sound hackish to me. Consider that people will also want to persist
the email (DB/file). Any way you look at it, email is not a web page.
It is not a regular document either. It has a recipient, headers, reply-to,
and is much closer to JMS (guess where the inspiration for JMS came from...)
than a regular document.
How about:
* a custom context that can hold the info you need to render the email
(or just a use map of strings)
* a renderer independent of view technologies, that has a pluggable templating
engine
* templating engine (Velocity, regex, whatever, even JSF if people love it so much)
* easliy pluggable transport(s), so that you can send, save, save+send or just
pipe your email to whatever needs to process it next.