2 Replies Latest reply on Jul 21, 2008 11:21 AM by tony.herstell1

    Seam Text II

    tony.herstell1

      I created some text (using seam text markup).


      I figured that when I rendered an email I would just do this:


      <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"
           xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets">
                <m:from name="Selwyn Equestrian Centre" address="tony.herstell@selwynequestriancentre.co.nz" />
                <!--<m:to name="#{user.firstname} #{user.surname}">#{user.email}</m:to>-->
                <m:to>#{messages.email_tony_email}</m:to>
                <m:subject>News from Selwyn Equestrian Centre</m:subject>
                <m:body>
                     <p>
                          <!--<m:attachment rendered="#{eachRecipient.avatar ne null}" value="#{eachRecipient.avatar.image}"
                               fileName="#{eachRecipient.avatar.name}" contentType="#{eachRecipient.avatar.type}"
                               disposition="inline" />
                          <h:outputText value="Dear #{eachRecipient.firstname}" />,-->
                     </p>
                     <p>
                          <h:outputText value="#{messageText}">
                               <s:formattedText/>
                          </h:outputText>
                     </p>
                     <p>
                          <h:outputText value="#{messages.email_sec}" />
                     </p>
                     <p>
                          <h:outputText value="#{messages.email_website_sec}" />
                     </p>
                </m:body>
           </m:message>



      to get my text run out as HTML so that I can send out mailshots.


      I actually don't get the HTML it seams... I just get the wiki marked up text and its not treated as html.


      I think I have 2 problems:



      1. I need to turn the seam wiki text into HTML to be dumped into the message

      2. I need to set the message as HTML type.



      Please advise


      Thx.

        • 1. Re: Seam Text II
          tony.herstell1

          Viewing soure in my preview page I see this (html)


          <p class="seamTextPara"> sdfsdf sf sdf s df </p>
          <p class="seamTextPara"> sdf sdfsdf </p>
          <p class="seamTextPara">
          <u>sdfsdfsfsd</u>
          </p>
          <ol class="seamTextOrderedList">
          <li class="seamTextOrderedListItem">aasdad</li>
          <li class="seamTextOrderedListItem">fdffd</li>
          </ol>
          <p class="seamTextPara"> cvx </p>
          <p class="seamTextPara"> xxxx</p>




          I just want this appearing in my email...

          • 2. Re: Seam Text II
            tony.herstell1

            Fixed


            I had to use this setup


            <p>
                 <s:formattedText value="#{messageText}"/>
            </p>
            



            as apposed to this setup


            <p>
                <h:outputText value="#{messageText}">
                 <s:formattedText/>
                </h:outputText>
            </p>