[seam-dev] Let me know what you need for a first stab at the PDF/Mail port from Seam 2

Nikolay Elenkov nick at sarion.co.jp
Sun May 23 21:32:46 EDT 2010


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/MockObjectsforTestDrivenJSFDevelopmentorgjbosstest-jsfjsf-mockproject
> 
> 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.




More information about the seam-dev mailing list