[jboss-cvs] JBossAS SVN: r105605 - projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 2 19:12:53 EDT 2010


Author: misty at redhat.com
Date: 2010-06-02 19:12:52 -0400 (Wed, 02 Jun 2010)
New Revision: 105605

Modified:
   projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Mail.xml
Log:
JBPAPP-4387

Modified: projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Mail.xml
===================================================================
--- projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Mail.xml	2010-06-02 22:44:21 UTC (rev 105604)
+++ projects/docs/enterprise/EAP/trunk/5.x/Seam_Reference_Guide/en-US/Mail.xml	2010-06-02 23:12:52 UTC (rev 105605)
@@ -22,7 +22,7 @@
 			Seam uses Facelets to template emails.
 		</para>
 		 
-<programlisting role="XHTML"><![CDATA[<m:message xmlns="http://www.w3.org/1999/xhtml"
+<programlisting language="XML" role="XML"><![CDATA[<m:message xmlns="http://www.w3.org/1999/xhtml"
            xmlns:m="http://jboss.com/products/seam/mail"
            xmlns:h="http://java.sun.com/jsf/html">
   
@@ -55,7 +55,7 @@
 			Once the <literal>m:message</literal> is rendered, the <literal>mailSession</literal> is called to send the email. To send your email, have Seam render the view:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[@In(create=true)
+<programlisting language="Java" role="JAVA">@In(create=true)
 private Renderer renderer;
    
 public void send() {
@@ -65,7 +65,7 @@
   } catch (Exception e) {
     facesMessages.add("Email sending failed: " + e.getMessage());
   }
-}]]>
+}
 </programlisting>
 		 <para>
 			If, for example, you entered an invalid email address, then an exception is thrown, caught and then displayed to the user.
@@ -79,26 +79,26 @@
 				For example, to email the <filename>jboss-seam-mail.jar</filename>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar"/>]]>
 </programlisting>
 			 <para>
 				Seam loads the file from the classpath and attaches it to the email. By default, this file is attached as <filename>jboss-seam-mail.jar</filename>, but you can change the attachment name by adding and editing the <literal>fileName</literal> attribute:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar" 
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment value="/WEB-INF/lib/jboss-seam-mail.jar" 
    fileName="this-is-so-cool.jar"/>]]>
 </programlisting>
 			 <para>
 				You can also attach a <literal>java.io.File</literal>, a <literal>java.net.URL</literal>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment value="#{numbers}"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment value="#{numbers}"/>]]>
 </programlisting>
 			 <para>
 				Or a <literal>byte[]</literal> or a <literal>java.io.InputStream</literal>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment value="#{person.photo}" contentType="image/png"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment value="#{person.photo}" contentType="image/png"/>]]>
 </programlisting>
 			 <para>
 				For <literal>byte[]</literal> and <literal>java.io.InputStream</literal>, you will need to specify the MIME type of the attachment, since this information is not carried as part of the file.
@@ -107,7 +107,7 @@
 				You can attach a Seam-generated PDF, or any standard JSF view, by wrapping a <literal><![CDATA[<m:attachment>]]></literal> tag around your normal tags:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment fileName="tiny.pdf"> 
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment fileName="tiny.pdf"> 
   <p:document>
     A very tiny PDF
   </p:document> 
@@ -117,7 +117,7 @@
 				To attach a set of files &#8212; for example, a set of pictures loaded from a database &#8212; you can use a <literal><![CDATA[<ui:repeat>]]></literal>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<ui:repeat value="#{people}" var="person"> 
+<programlisting language="XML" role="XML"><![CDATA[<ui:repeat value="#{people}" var="person"> 
   <m:attachment value="#{person.photo}" contentType="image/jpeg"
      fileName="#{person.firstname}_#{person.lastname}.jpg"/> 
 </ui:repeat>]]>
@@ -126,7 +126,7 @@
 				To display an attached image inline:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:attachment value="#{person.photo}" contentType="image/jpeg" 
+<programlisting language="XML" role="XML"><![CDATA[<m:attachment value="#{person.photo}" contentType="image/jpeg" 
    fileName="#{person.firstname}_#{person.lastname}.jpg" 
    status="personPhoto" disposition="inline" /> 
 <img src="cid:#{personPhoto.contentId}" />]]>
@@ -145,7 +145,7 @@
 				Although most mail readers support HTML, some do not. You can add a plain text alternative to your email body:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:body> 
+<programlisting language="XML" role="XML"><![CDATA[<m:body> 
   <f:facet name="alternative">
     Sorry, your email reader can't show our fancy email. Please go to 
     http://labs.jboss.com/jbossseam to explore Seam.
@@ -160,7 +160,7 @@
 				Often you will want to send an email to a group of recipients, such as your users. All recipient mail tags can be placed inside a <literal><![CDATA[<ui:repeat>]]></literal>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<ui:repeat value="#{allUsers} var="user"> 
+<programlisting language="XML" role="XML"><![CDATA[<ui:repeat value="#{allUsers} var="user"> 
   <m:to name="#{user.firstname} #{user.lastname}" 
         address="#{user.emailAddress}"/> 
 </ui:repeat>]]>
@@ -173,7 +173,7 @@
 				Sometimes &#8212; for example, during a password reset &#8212; you will need to send a slightly different message to each recipient. The best way to do this is to place the whole message inside a <literal><![CDATA[<ui:repeat>]]></literal>:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<ui:repeat value="#{people}" var="p">
+<programlisting language="XML" role="XML"><![CDATA[<ui:repeat value="#{people}" var="p">
   <m:message> 
     <m:from name="#{person.firstname} #{person.lastname}">
       #{person.address}
@@ -195,7 +195,7 @@
 				Our <filename>template.xhtml</filename> contains:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:message>
+<programlisting language="XML" role="XML"><![CDATA[<m:message>
   <m:from name="Seam" address="do-not-reply at jboss.com" />
   <m:to name="#{person.firstname} #{person.lastname}">
     #{person.address}
@@ -216,7 +216,7 @@
 				Our <literal>templating.xhtml</literal> contains:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<ui:param name="subject" value="Templating with Seam Mail"/> 
+<programlisting role="XML"><![CDATA[<ui:param name="subject" value="Templating with Seam Mail"/> 
   <ui:define name="body"> 
     <p>
       This example demonstrates that you can easily use 
@@ -239,7 +239,7 @@
 				Seam supports sending internationalized messages. By default, Seam uses encoding provided by JSF, but this can be overridden on the template:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:message charset="UTF-8"> 
+<programlisting language="XML" role="XML"><![CDATA[<m:message charset="UTF-8"> 
   ... 
 </m:message>]]>
 </programlisting>
@@ -247,7 +247,7 @@
 				The body, subject, and recipient and sender names are encoded. You will need to make sure that Facelets parses your page with the correct character set by setting the encoding of the template:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
+<programlisting language="XML" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
 </programlisting>
 		</section>
 		
@@ -257,14 +257,14 @@
 				Seam also provides support for some additional email headers. (See <xref linkend="mail.tags" />.) You can set the importance of the email, and ask for a read receipt:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:message xmlns:m="http://jboss.com/products/seam/mail" 
+<programlisting language="XML" role="XML"><![CDATA[<m:message xmlns:m="http://jboss.com/products/seam/mail" 
    importance="low" requestReadReceipt="true"/>]]>
 </programlisting>
 			 <para>
 				Otherwise, you can add any header to the message by using the <literal><![CDATA[<m:header>]]></literal> tag:
 			</para>
 			 
-<programlisting role="XHTML"><![CDATA[<m:header name="X-Sent-From" value="JBoss Seam"/>]]>
+<programlisting language="XML" role="XML"><![CDATA[<m:header name="X-Sent-From" value="JBoss Seam"/>]]>
 </programlisting>
 		</section>
 		
@@ -283,7 +283,7 @@
 			You can configure <filename>mail-ra.rar</filename> like so:
 		</para>
 		 
-<programlisting role="JAVA"><![CDATA[@MessageDriven(activationConfig={
+<programlisting language="Java" role="JAVA">@MessageDriven(activationConfig={
   @ActivationConfigProperty(propertyName="mailServer", 
                             propertyValue="localhost"),
   @ActivationConfigProperty(propertyName="mailFolder", 
@@ -307,7 +307,7 @@
      orderProcessor.process(message.getSubject());
   }
    
-}]]>
+}
 </programlisting>
 		 <para>
 			Each message received calls <literal>onMessage(Message message)</literal>. Most Seam annotations work inside a MDB, but you must not access the persistence context.
@@ -353,7 +353,7 @@
 					The JBossAS <filename>deploy/mail-service.xml</filename> configures a JavaMail session binding into JNDI. The default service configuration must be altered for your network. <ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail">http://wiki.jboss. org/wiki/Wiki.jsp?page=JavaMail</ulink> describes the service in more detail.
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
+<programlisting language="XML" role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
             xmlns:core="http://jboss.com/products/seam/core" 
             xmlns:mail="http://jboss.com/products/seam/mail"> 
   <mail:mail-session session-jndi-name="java:/Mail"/> 
@@ -370,7 +370,7 @@
 					A mail session can be configured via <filename>components.xml</filename>. Here we tell Seam to use <literal>smtp.example.com</literal> as the SMTP server:
 				</para>
 				 
-<programlisting role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
+<programlisting language="XML" role="XML"><![CDATA[<components xmlns="http://jboss.com/products/seam/components" 
             xmlns:core="http://jboss.com/products/seam/core" 
             xmlns:mail="http://jboss.com/products/seam/mail"> 
   <mail:mail-session host="smtp.example.com"/> 




More information about the jboss-cvs-commits mailing list