Well let&#39;s see if we can get you started, then :)<br><br>Have no fear!<br><br>Let me know if this helps:<br><ul><li>Create a JSF2 project. Here&#39;s a starting tutorial that takes about 5 minutes to get the project running.<br>
<a href="http://www.javaserverfaces.org/get-started#TOC-Creating-a-JSF-2-and-CDI-project">http://www.javaserverfaces.org/get-started#TOC-Creating-a-JSF-2-and-CDI-project</a><br><br></li><li>Create a page that, when requested, calls a JSF Managed Bean action (You can start by doing this with &lt;f:event type=&quot;PreRenderViewEvent&quot; listener=&quot;#{myBean.mailListener}&quot;&gt; -- <a href="https://javaserverfaces.dev.java.net/nonav/docs/2.0/pdldocs/facelets/index.html">https://javaserverfaces.dev.java.net/nonav/docs/2.0/pdldocs/facelets/index.html</a><br>
<br></li><li>In that listener method, try to use something like this:<br><br>(HttpServletRequest) request.getRequestDispatcher(&quot;/path/to/mail/view.xhtml&quot;).forward(MockHttpRequestObject, MockHttpResponseObject);<br>
<br></li><li>Try to capture the output of that new MockHttpResponseObject when JSF has finished processing it .. the forward(...) method will actually start another JSF request in the background.<br></li></ul>This may or may not work, but it&#39;s what I would try first. If capturing the output from a &quot;background&quot; request works, then getting the mail rendering set up will be pretty easy. This, of course, requires that JSF be running, but -- that&#39;s not such a bad requirement to start with. We can worry about starting it up later.<br>
<br><br>--Lincoln<br><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#888888"></font><div><div></div><div class="h5"><br>
On Fri, May 21, 2010 at 9:24 AM, Lincoln Baxter, III<br>
&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt; I think for now these should be the same module. &quot;Seam Docs&quot; -- There&#39;s also<br>
&gt; been speculation on whether a Mock Framework could be used to boot-up JSF<br>
&gt; and render documents.<br>
&gt;<br>
&gt; <a href="http://community.jboss.org/wiki/MockObjectsforTestDrivenJSFDevelopmentorgjbosstest-jsfjsf-mockproject" target="_blank">http://community.jboss.org/wiki/MockObjectsforTestDrivenJSFDevelopmentorgjbosstest-jsfjsf-mockproject</a><br>

&gt;<br>
&gt; Another alternative is to build a UIViewRoot, and replace it during the<br>
&gt; PreRenderViewEvent (which specifically states that it can be used to replace<br>
&gt; the UIViewRoot.)<br>
&gt;<br>
&gt; Or.. there&#39;s the possibility of simply creating a &quot;fake&quot; Request and<br>
&gt; Response object, and doing an internal forward in order to capture output<br>
&gt; and capture the output (via the faked response object) to be used in<br>
&gt; generating the PDF or Mail document.<br>
&gt;<br>
&gt; This last option is probably where I would start. I&#39;d start by simply trying<br>
&gt; to create a new request and capture the output -- just try on a normal page,<br>
&gt; we can worry about generating pages that look like email documents after<br>
&gt; this basic functionality is working.<br>
&gt;<br>
&gt; --Lincoln<br>
&gt;<br>
&gt;<br>
&gt; 2010/5/21 Cody Lerum &lt;<a href="mailto:cody.lerum@gmail.com">cody.lerum@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; So a seam-mail and a seam-reporting?<br>
&gt;&gt;<br>
&gt;&gt; -C<br>
&gt;&gt;<br>
&gt;&gt; 2010/5/21 Tomaž Cerar &lt;<a href="mailto:cerar@parsek.com">cerar@parsek.com</a>&gt;:<br>
&gt;&gt; &gt; Hi guys,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Will pdf and mail be separate modules?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I would also like to contribute to both modules.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have done some extensive research of existing mail module code while<br>
&gt;&gt; &gt; tracking down JBSEAM-3555 and have found out that current approach to<br>
&gt;&gt; &gt; using<br>
&gt;&gt; &gt; JSF in seam mail error-prone J<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Currently seam just uses jsf that was initalized in web application and<br>
&gt;&gt; &gt; that<br>
&gt;&gt; &gt; is why there are some ugly hacks to make it work when you invoke seam<br>
&gt;&gt; &gt; mail<br>
&gt;&gt; &gt; from from non-web request (ejb,mdb,...)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Pete has sugessted that new seam-mail modul should start its own<br>
&gt;&gt; &gt; instance of<br>
&gt;&gt; &gt; JSF.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Main problem with jsf is that there is no standard api to programaticly<br>
&gt;&gt; &gt; set-up jsf enviroment. Idea is that seam implements RI (Mojarra 2.0)<br>
&gt;&gt; &gt; with<br>
&gt;&gt; &gt; implementation specific api and possible others if they provide any<br>
&gt;&gt; &gt; machins<br>
&gt;&gt; &gt; for starting up.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I would also like to contribute do pdf module as we have some in-house<br>
&gt;&gt; &gt; improvments and also some friends are willing to contibute huge upgrade<br>
&gt;&gt; &gt; to<br>
&gt;&gt; &gt; seam-pdf(forms,etc,..) but it is currently seam 2.0.x based.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; As I have not yet had much time to dive deeply into CDI and Seam 3(but I<br>
&gt;&gt; &gt; folow development closly) a kick start as setting up seam3 module would<br>
&gt;&gt; &gt; be<br>
&gt;&gt; &gt; much apreciated. Altough I can help to »rip out« any seam 2 module...<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cheers,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Tomaž<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; From: <a href="mailto:seam-dev-bounces@lists.jboss.org">seam-dev-bounces@lists.jboss.org</a><br>
&gt;&gt; &gt; [mailto:<a href="mailto:seam-dev-bounces@lists.jboss.org">seam-dev-bounces@lists.jboss.org</a>] On Behalf Of Lincoln Baxter,<br>
&gt;&gt; &gt; III<br>
&gt;&gt; &gt; Sent: Thursday, May 20, 2010 4:57 PM<br>
&gt;&gt; &gt; To: <a href="mailto:cody.lerum@gmail.com">cody.lerum@gmail.com</a>; Dan Allen; Seam Dev List<br>
&gt;&gt; &gt; Subject: [seam-dev] Let me know what you need for a first stab at the<br>
&gt;&gt; &gt; PDF/Mail port from Seam 2<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi Cody, you have my email address now.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;m actually not very familiar with Seam 2, which is one of the reasons<br>
&gt;&gt; &gt; this<br>
&gt;&gt; &gt; has been lower priority, but if you can &quot;rip&quot; that part out of Seam 2<br>
&gt;&gt; &gt; and<br>
&gt;&gt; &gt; make it a standalone maven project, I can help you get it set up as a<br>
&gt;&gt; &gt; Seam 3<br>
&gt;&gt; &gt; module and all that goodness :)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a> (if you don&#39;t already know) is where we discuss<br>
&gt;&gt; &gt; development, so you can also ask questions there --<br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a> is where you can sign<br>
&gt;&gt; &gt; up.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks for reaching out!<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Lincoln Baxter, III<br>
&gt;&gt; &gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt; &gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt; &gt; &quot;Keep it Simple&quot;<br>
&gt;&gt; &gt; !DSPAM:6,4bf54e13248112142088973!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lincoln Baxter, III<br>
&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &quot;Keep it Simple&quot;<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>