どのようにシームメイルとスタイルをうまく使いますか?私はこれを何時間も見つけましたが、私は自分のメールをスタイルする良い方法を見つけることができません。 datatableは全くスタイルなしで出現します。 "標準"ボーダーなどでさえもありません。Seamのバージョンは2.2.2です。シームメールとCSS(どのように動作するのですか)
基本的に、スタイルでメールを送信するための良い方法は何ですか?例は非常に感謝しています。
以下にfacelet:見通しで
<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:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:s="http://jboss.com/products/seam/taglib">
<m:from name="#{message.mailFrom}" address="[email protected]" />
<m:to name="mailFromName" address="[email protected]" />
<m:subject>
<h:outputText value="#{message.mailTopic} Orderid: #{order.id}" />
</m:subject>
<m:body>
<f:facet name="alternative">Sorry, your email reader can't show our fancy email</f:facet>
<html>
<head>
<a4j:loadBundle var="message" basename="messagesGenericPurchase" />
<link href="#{facesContext.externalContext.requestContextPath}/stylesheet/mail.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>#{message.mailHeadLine} #{order.form.name}</h2>
<hr style="border:1px solid red;"></hr>
<h:outputText value="#{message.mailOrderHead}"
style="font-weight:bold; line-height:20px;" />
<rich:dataTable var="hField" value="#{order.headFields}">
<rich:column style="width: 100px;">
<h:outputText value="#{hField.field.label}" />
</rich:column>
<rich:column style="width: 100px border:2px;">
<h:outputText value="#{hField.value}" style="border:2px;"/>
</rich:column>
</rich:dataTable>
</body>
</html>
</m:body>
</m:message
生成される出力:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link href="http://dl.dropbox.com/u/860312/genericPurchase.css" rel="stylesheet" type="text/css">
</head>
<body>
<h2>Ny beställning: Arbetskläder3</h2>
<hr style="border:1px solid red;"><span style="font-weight:bold; line-height:20px;">Orderhuvud</span><table class="rich-table " id="j_id11" border="0" cellpadding="0" cellspacing="0"><colgroup span="2"></colgroup><tbody id="j_id11:tb"><tr class="rich-table-row rich-table-firstrow "><td class="rich-table-cell " id="j_id11:0:j_id12" style="width: 100px;">test</td><td class="rich-table-cell " id="j_id11:0:j_id14" style="width: 100px border:2px;"><span style="border:2px;">asd</span></td></tr><tr class="rich-table-row "><td class="rich-table-cell " id="j_id11:1:j_id12" style="width: 100px;">test</td><td class="rich-table-cell " id="j_id11:1:j_id14" style="width: 100px border:2px;"><span style="border:2px;">asd</span></td></tr><tr class="rich-table-row "><td class="rich-table-cell " id="j_id11:2:j_id12" style="width: 100px;">test</td><td class="rich-table-cell " id="j_id11:2:j_id14" style="width: 100px border:2px;"><span style="border:2px;">asd</span></td></tr></tbody></table>
</body>
</html>