2 Replies Latest reply on Jul 21, 2010 8:29 PM by shane lee

    Tag <s:link> does not render in <m:message> (Seam 2.2)

    Ben Vanberg Newbie
      Hello, I'm trying to place a link in a seam email template using <s:link>

      Thus far the <s:link> is not being rendered in the email, however I do see the raw <s:link> in the html content of the email.

      I've tried placing a simple <s:link> in one of the email templates from the Seam 2.2 example application with the same results. I have not found any discussions on this topic or solutions. Any help would be much appreciated.
        • 1. Re: Tag <s:link> does not render in <m:message> (Seam 2.2)
          Herberson Silva Newbie

          Try add reference to xmlns:s="http://jboss.com/products/seam/taglib" on root xhtml tag, because most of email examples don't have that on their root xhtml tag.


          Using simple.xhtml example file, you may have something like 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">
              
                    <m:from name="Peter" address="peter@example.com" />
                    <m:to name="#{person.firstname} #{person.lastname}">#{person.address}</m:to>
                    <m:subject>Try out Seam!</m:subject>
                    <m:body>
                        <p><h:outputText value="Dear #{person.firstname}" />,</p>
                  <p>You can try out Seam by visiting <a href="http://www.seamframework.org">http://www.seamframework.org</a>.</p>
                  <p>Regards</p>
                  <p>Peter</p>
              </m:body>
          </m:message>



          • 2. Re: Tag <s:link> does not render in <m:message> (Seam 2.2)
            shane lee Newbie

            Like herberson said ben, if you want to place a link in your mail template then use:




            <a href="http://www.seamframework.org">http://www.seamframework.org</a>




            <s:link> is used in your seam application for rendering a view id or invoking an action during apply request values phase or invoke application phase.


            Examples:



            <s:link view="/attachment.xhtml"  value="Add more attachments" />
            <s:link id="viewInquiryPDF"  value="Inquiry PDF" action="#{inquiry.serveInquiryPDF}"/>