[seam-commits] Seam SVN: r8193 - in branches/Seam_1_2_1_AP/examples/mail: view and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu May 15 07:00:06 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-05-15 07:00:06 -0400 (Thu, 15 May 2008)
New Revision: 8193

Modified:
   branches/Seam_1_2_1_AP/examples/mail/src/org/jboss/seam/example/mail/MailExample.java
   branches/Seam_1_2_1_AP/examples/mail/view/index.xhtml
Log:
JBPAPP-803, port of r4991

Modified: branches/Seam_1_2_1_AP/examples/mail/src/org/jboss/seam/example/mail/MailExample.java
===================================================================
--- branches/Seam_1_2_1_AP/examples/mail/src/org/jboss/seam/example/mail/MailExample.java	2008-05-14 16:56:29 UTC (rev 8192)
+++ branches/Seam_1_2_1_AP/examples/mail/src/org/jboss/seam/example/mail/MailExample.java	2008-05-15 11:00:06 UTC (rev 8193)
@@ -81,6 +81,16 @@
       asynchronousMailProcessor.scheduleSend(3000, person);
    }
    
+   public void sendTemplate() {
+      try {
+         renderer.render("/templating.xhtml");
+         facesMessages.add("Email sent successfully");
+      } catch (Exception e) {
+         log.error("Error sending mail", e);
+         facesMessages.add("Email sending failed: " + e.getMessage());
+      }
+    }
+   
    @Factory("numbers")
    public URL getFile()
    {

Modified: branches/Seam_1_2_1_AP/examples/mail/view/index.xhtml
===================================================================
--- branches/Seam_1_2_1_AP/examples/mail/view/index.xhtml	2008-05-14 16:56:29 UTC (rev 8192)
+++ branches/Seam_1_2_1_AP/examples/mail/view/index.xhtml	2008-05-15 11:00:06 UTC (rev 8193)
@@ -33,7 +33,7 @@
 	        <h:commandButton action="#{mailExample.sendHtml}" value="Send HTML Email" />
 	        <h:commandButton action="#{mailExample.sendAttachment}" value="Send a simple email with attachment" />
 	        <h:commandButton action="#{mailExample.sendAsynchronous}" value="Send a simple email asynchronously" />
-	        <h:commandButton action="/templating.xhtml" value="Send Templated Email" />
+	        <h:commandButton action="#{mailExample.sendTemplate}" value="Send a templated email" />
         </h:panelGrid>
         <h:messages infoStyle="info" errorStyle="error" fatalStyle="fatal" warnStyle="warn" />
     </h:form>




More information about the seam-commits mailing list