[seam-commits] Seam SVN: r7449 - in trunk/examples/wiki: src/etc/WEB-INF and 13 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Feb 19 10:40:22 EST 2008


Author: christian.bauer at jboss.com
Date: 2008-02-19 10:40:22 -0500 (Tue, 19 Feb 2008)
New Revision: 7449

Added:
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiRequestException.java
   trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml
   trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
   trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
   trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
   trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
   trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
Removed:
   trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml
Modified:
   trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
   trunk/examples/wiki/src/etc/WEB-INF/pages.xml
   trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
   trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
   trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java
   trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
   trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml
   trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
   trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
Log:
JBSEAM-2631, send notification emails of forum to mailing list

Modified: trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/etc/META-INF/wiki.taglib.xml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -132,6 +132,12 @@
         <function-signature>boolean isLastItemInList(java.util.List,java.lang.Object)</function-signature>
     </function>
 
+    <function>
+        <function-name>calculateMessageId</function-name>
+        <function-class>org.jboss.seam.wiki.util.WikiUtil</function-class>
+        <function-signature>java.lang.String calculateMessageId(java.lang.Long,java.lang.String)</function-signature>
+    </function>
+
     <tag>
         <tag-name>formattedText</tag-name>
 		<handler-class>org.jboss.seam.wiki.core.ui.WikiFormattedTextHandler</handler-class> 

Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -342,7 +342,8 @@
 
 
     <exception class="javax.faces.application.ViewExpiredException">
-        <!-- TODO: This is never thrown by JSF -->
+        <!-- TODO: This is never thrown by JSF, Richfaces is the problem!-->
+        <end-conversation/>
         <redirect view-id="/wiki.xhtml">
             <message>Your session has timed out, please try again</message>
         </redirect>
@@ -368,9 +369,17 @@
         <http-error error-code="404"/>
     </exception>
 
-    <exception>
+    <exception class="org.jboss.seam.wiki.core.exception.InvalidWikiRequestException">
         <end-conversation/>
-        <http-error error-code="400"> <!-- We send a BAD REQUEST here because we don't want the client to retry later (Googlebot...) -->
+        <http-error error-code="400">
+            <message>#{org.jboss.seam.handledException.message}</message>
+        </http-error>
+    </exception>
+
+    <!-- We send a BAD REQUEST here because we don't want the client to retry later (Googlebot...) -->
+    <exception log="true" logLevel="error">
+        <end-conversation/>
+        <http-error error-code="400">
             <message severity="ERROR">
                 #{messages['lacewiki.msg.FatalError']} (#{wikiInit.adminContact})
             </message>

Modified: trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/etc/i18n/messages_forum_en.properties	2008-02-19 15:40:22 UTC (rev 7449)
@@ -1,6 +1,7 @@
 forum.preferences.Name=Plugin: Forum
 forum.preferences.TopicsPerPage=Number of topics per page
 forum.preferences.NotifyMeOfReplies=Enable e-mail reply notification switch by default
+forum.preferences.NotificationMailingList=Send all topics/replies to this e-mail address (empty to disable)
 
 forum.label.Showing=Showing
 forum.label.To=to

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -20,6 +20,7 @@
 import org.jboss.seam.wiki.core.feeds.FeedEntryManager;
 import org.jboss.seam.wiki.core.model.*;
 import org.jboss.seam.wiki.core.action.prefs.CommentsPreferences;
+import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
 import org.jboss.seam.wiki.util.WikiUtil;
 
 import static javax.faces.application.FacesMessage.SEVERITY_INFO;
@@ -281,34 +282,25 @@
     @Begin(flushMode = FlushModeType.MANUAL, join = true)
     public String replyTo() {
         if (parentCommentId == null || parentCommentId.equals(0l))
-            throw new IllegalStateException("Missing parentCommentId request parameter");
+            throw new InvalidWikiRequestException("Missing parentCommentId request parameter");
 
-        if (commentsPreferences.getThreaded()) {
-            // Override parent from @Create
-            setParentNodeId(parentCommentId);
-        }
         getLog().debug("reply to comment id: " + parentCommentId);
-        newComment();
+        String outcome = newComment();
 
-        if (commentsPreferences.getThreaded()) {
-            getInstance(); // Init
-            setReplySubject((WikiComment)getParentNode());
-        } else {
-            setReplySubject(getWikiNodeDAO().findWikiComment(parentCommentId));
-        }
-        return "redirectToDocument";
+        setParentNodeId(parentCommentId);
+        getInstance(); // Init the parent
+        setReplySubject((WikiComment)getParentNode());
+
+        return outcome;
     }
 
     @Begin(flushMode = FlushModeType.MANUAL, join = true)
     public String quote() {
-        replyTo();
 
-        if (commentsPreferences.getThreaded()) {
-            setQuotedContent((WikiComment)getParentNode());
-        } else {
-            setQuotedContent(getWikiNodeDAO().findWikiComment(parentCommentId));
-        }
-        return "redirectToDocument";
+        String outcome = replyTo();
+        setQuotedContent((WikiComment)getParentNode());
+
+        return outcome;
     }
 
     public void rate(Long commentId, int rating) {

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -14,11 +14,11 @@
 import org.jboss.seam.framework.EntityHome;
 import org.jboss.seam.security.AuthorizationException;
 import org.jboss.seam.security.Identity;
-import org.jboss.seam.wiki.core.dao.TagDAO;
 import org.jboss.seam.wiki.core.dao.UserDAO;
 import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
 import org.jboss.seam.wiki.core.model.*;
 import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
+import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
 import org.jboss.seam.wiki.util.WikiUtil;
 import org.jboss.seam.wiki.preferences.Preferences;
 
@@ -130,7 +130,7 @@
     public N afterNodeCreated(N node) {
 
         if (parentNodeId == null)
-            throw new IllegalStateException("Missing parentNodeId parameter");
+            throw new InvalidWikiRequestException("Missing parentNodeId parameter");
 
         outjectCurrentLocation(node);
 
@@ -142,7 +142,7 @@
         getLog().debug("loading parent node with id: " + parentNodeId);
         parentNode = findParentNode(parentNodeId);
         if (parentNode == null)
-            throw new IllegalStateException("Could not find parent node with id: " + parentNodeId);
+            throw new InvalidWikiRequestException("Could not find parent node with id: " + parentNodeId);
         getLog().debug("initalized with parent node: " + parentNode);
 
         // Check write access level of the parent node, if the user wants to create a new node

Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiRequestException.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiRequestException.java	                        (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/exception/InvalidWikiRequestException.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.exception;
+
+/**
+ * Thrown if an illegal GET request was made (missing parameters, etc).
+ *
+ * @author Christian Bauer
+ */
+public class InvalidWikiRequestException extends RuntimeException {
+
+    public InvalidWikiRequestException(String s) {
+        super(s);
+    }
+}

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiCommentFeedEntryManager.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -18,7 +18,7 @@
 
         WikiCommentFeedEntry fe = new WikiCommentFeedEntry();
 
-        fe.setLink(wikiURLRenderer.renderURL(comment));
+        fe.setLink(wikiURLRenderer.renderURL(comment, true));
         fe.setTitle(getFeedEntryTitle(comment));
         fe.setAuthor(comment.getCreatedBy().getFullname());
         fe.setUpdatedDate(fe.getPublishedDate());
@@ -34,7 +34,7 @@
 
     public void updateFeedEntry(WikiCommentFeedEntry fe, WikiComment comment) {
 
-        fe.setLink(wikiURLRenderer.renderURL(comment));
+        fe.setLink(wikiURLRenderer.renderURL(comment, true));
         fe.setTitle(Messages.instance().get("lacewiki.label.comment.FeedEntryTitlePrefix") + " " + comment.getSubject());
         fe.setAuthor(comment.getCreatedBy().getFullname());
         fe.setUpdatedDate(comment.getLastModifiedOn());

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/feeds/WikiDocumentFeedEntryManager.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -17,7 +17,7 @@
 
         WikiDocumentFeedEntry fe = new WikiDocumentFeedEntry();
 
-        fe.setLink(wikiURLRenderer.renderURL(document));
+        fe.setLink(wikiURLRenderer.renderURL(document, true));
         fe.setTitle(getFeedEntryTitle(document));
         fe.setAuthor(document.getCreatedBy().getFullname());
         fe.setUpdatedDate(fe.getPublishedDate());
@@ -33,7 +33,7 @@
 
     public void updateFeedEntry(WikiDocumentFeedEntry fe, WikiDocument document) {
 
-        fe.setLink(wikiURLRenderer.renderURL(document));
+        fe.setLink(wikiURLRenderer.renderURL(document, true));
         fe.setTitle(getFeedEntryTitle(document));
         fe.setAuthor(document.getCreatedBy().getFullname());
         fe.setUpdatedDate(document.getLastModifiedOn());

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/renderer/WikiURLRenderer.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -42,60 +42,98 @@
     WikiPreferences prefs;
 
     public String renderSearchURL(String search) {
+        return renderSearchURL(search, false);
+    }
+
+    public String renderSearchURL(String search, boolean usePrefsPath) {
         if (search == null || search.length() == 0) return "";
         StringBuilder url = new StringBuilder();
         String skin = Component.getInstance("skin") != null ? (String)Component.getInstance("skin") : "d";
-        url.append(basePath).append("/search_").append(skin).append(".seam?query=").append(encodeURL(search));
+        url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+        url.append("/search_").append(skin).append(".seam?query=").append(encodeURL(search));
         return url.toString();
     }
 
     public String renderTagURL(String tag) {
+        return renderTagURL(tag, false);
+    }
+
+    public String renderTagURL(String tag, boolean usePrefsPath) {
         if (tag == null || tag.length() == 0) return "";
         StringBuilder url = new StringBuilder();
-        url.append(basePath).append("/tag/").append(encodeURL(tag));
+        url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+        url.append("/tag/").append(encodeURL(tag));
         return url.toString();
     }
 
     public String renderUserInfoURL(User user) {
+        return renderUserInfoURL(user, false);
+    }
+
+    public String renderUserInfoURL(User user, boolean usePrefsPath) {
         if (user == null || user.getUsername() == null) return "";
         StringBuilder url = new StringBuilder();
-        url.append(basePath).append("/user/").append(user.getUsername());
+        url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+        url.append("/user/").append(user.getUsername());
         return url.toString();
     }
 
     public String renderAggregateFeedURL(String aggregateId) {
+        return renderAggregateFeedURL(aggregateId, false);
+
+    }
+
+    public String renderAggregateFeedURL(String aggregateId, boolean usePrefsPath) {
         if (aggregateId == null) return "";
         StringBuilder url = new StringBuilder();
-        url.append(basePath)
-            .append("/service/Feed/atom/Aggregate/")
-            .append(aggregateId);
+        url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+        url.append("/service/Feed/atom/Aggregate/").append(aggregateId);
         return url.toString();
     }
 
     public String renderFeedURL(Feed feed, String tag, String comments) {
+        return renderFeedURL(feed, tag, comments, false);
+    }
+
+    public String renderFeedURL(Feed feed, String tag, String comments, boolean usePrefsPath) {
         if (feed == null || feed.getId() == null) return "";
         StringBuilder url = new StringBuilder();
-        url.append(basePath).append("/service/Feed/atom").append(feed.getURL());
+        url.append(usePrefsPath ? prefs.getBaseUrl() : basePath);
+        url.append("/service/Feed/atom").append(feed.getURL());
         if (comments != null && comments.length() >0) {
             url.append("/Comments/").append(FeedServlet.Comments.valueOf(comments));
         }
-        if (tag != null && tag.length() >0) url.append("/Tag/").append(encodeURL(tag));
+        if (tag != null && tag.length() >0) {
+            url.append("/Tag/").append(encodeURL(tag));
+        }
         return url.toString();
     }
 
     public String renderURL(WikiNode node) {
+        return renderURL(node, false);
+    }
+
+    public String renderURL(WikiNode node, boolean usePrefsPath) {
         if (node == null || node.getId() == null) return "";
-        return prefs.isRenderPermlinks() ? renderPermURL(node) : renderWikiURL(node);
+        return prefs.isRenderPermlinks() ? renderPermURL(node, usePrefsPath) : renderWikiURL(node, usePrefsPath);
     }
 
     public String renderPermURL(WikiNode node) {
+        return renderPermURL(node, false);
+    }
+
+    public String renderPermURL(WikiNode node, boolean usePrefsPath) {
         if (node == null || node.getId() == null) return "";
-        return basePath + "/" + node.getPermURL(prefs.getPermlinkSuffix());
+        return (usePrefsPath ? prefs.getBaseUrl() : basePath) + "/" + node.getPermURL(prefs.getPermlinkSuffix());
     }
 
     public String renderWikiURL(WikiNode node) {
+        return renderWikiURL(node, false);
+    }
+
+    public String renderWikiURL(WikiNode node, boolean usePrefsPath) {
         if (node == null || node.getId() == null) return "";
-        return basePath + "/" + node.getWikiURL();
+        return (usePrefsPath ? prefs.getBaseUrl() : basePath) + "/" + node.getWikiURL();
     }
 
     private String encodeURL(String s) {

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ForumPreferences.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -2,6 +2,8 @@
 
 import org.hibernate.validator.NotNull;
 import org.hibernate.validator.Range;
+import org.hibernate.validator.Email;
+import org.hibernate.validator.Length;
 import org.jboss.seam.wiki.preferences.annotations.Preferences;
 import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
 import org.jboss.seam.wiki.preferences.PreferenceVisibility;
@@ -21,6 +23,15 @@
     private Long topicsPerPage;
 
     @PreferenceProperty(
+        description = "#{messages['forum.preferences.NotificationMailingList']}",
+        visibility = {PreferenceVisibility.SYSTEM},
+        editorIncludeName = "AdaptiveTextInput"
+    )
+    @Length(min = 4, max = 255)
+    @Email
+    private String notificationMailingList;
+
+    @PreferenceProperty(
         description = "#{messages['forum.preferences.NotifyMeOfReplies']}",
         visibility = PreferenceVisibility.USER
     )
@@ -30,6 +41,10 @@
         return topicsPerPage;
     }
 
+    public String getNotificationMailingList() {
+        return notificationMailingList;
+    }
+
     public Boolean getNotifyMeOfReplies() {
         return notifyMeOfReplies;
     }

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/ReplyHome.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -27,13 +27,25 @@
     private Renderer renderer;
 
     @Observer(value = "Comment.persisted", create = false)
-    public void notifyOriginalPoster() {
+    public void sendNotificationMails() {
         // Triggered by superclass after reply was persisted
+
+        // Notify forum mailing list
+        String notificationMailingList =
+                Preferences.getInstance(ForumPreferences.class).getNotificationMailingList();
+        if (notificationMailingList != null) {
+            getLog().debug("sending reply notification e-mail to forum list");
+            renderer.render("/themes/"
+                    + Preferences.getInstance(WikiPreferences.class).getThemeName()
+                    + "/mailtemplates/forumNotifyReplyToList.xhtml");
+        }
+
+        // Notify original poster
         if (documentHome.getInstance().macroPresent(TopicHome.TOPIC_NOTIFY_ME_MACRO)
             && !documentHome.getInstance().getCreatedBy().getUsername().equals(
                     getInstance().getCreatedBy().getUsername()
                 )) {
-            getLog().debug("sending confirmation e-mail to original poster");
+            getLog().debug("sending reply notification e-mail to original poster");
             renderer.render("/themes/"
                     + Preferences.getInstance(WikiPreferences.class).getThemeName()
                     + "/mailtemplates/forumNotifyReply.xhtml");

Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/plugin/forum/TopicHome.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -1,6 +1,7 @@
 package org.jboss.seam.wiki.plugin.forum;
 
 import org.jboss.seam.ScopeType;
+import org.jboss.seam.faces.Renderer;
 import org.jboss.seam.ui.validator.FormattedTextValidator;
 import org.jboss.seam.annotations.*;
 import org.jboss.seam.annotations.web.RequestParameter;
@@ -8,6 +9,7 @@
 import org.jboss.seam.core.Events;
 import org.jboss.seam.international.Messages;
 import org.jboss.seam.wiki.core.action.DocumentHome;
+import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
 import org.jboss.seam.wiki.core.model.WikiDirectory;
 import org.jboss.seam.wiki.core.model.WikiDocument;
 import org.jboss.seam.wiki.core.model.WikiDocumentDefaults;
@@ -27,6 +29,9 @@
     @In
     WikiDirectory currentDirectory;
 
+    @In(create = true)
+    private Renderer renderer;
+
     private boolean showForm = false;
     private boolean sticky = false;
     private boolean notifyReplies = false;
@@ -128,6 +133,16 @@
         String outcome = super.persist();
         if (outcome != null) {
 
+            // Notify forum mailing list
+            String notificationMailingList =
+                    Preferences.getInstance(ForumPreferences.class).getNotificationMailingList();
+            if (notificationMailingList != null) {
+                getLog().debug("sending topic notification e-mail to forum list");
+                renderer.render("/themes/"
+                        + Preferences.getInstance(WikiPreferences.class).getThemeName()
+                        + "/mailtemplates/forumNotifyTopicToList.xhtml");
+            }
+
             endConversation();
         }
         return null; // Prevent navigation

Modified: trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java
===================================================================
--- trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/src/test/org/jboss/seam/wiki/test/editing/Commenting.java	2008-02-19 15:40:22 UTC (rev 7449)
@@ -81,6 +81,62 @@
     }
 
     @Test
+    public void replyToComment() throws Exception {
+
+        new FacesRequest("/docDisplay_d.xhtml") {
+
+            protected void beforeRequest() {
+                setParameter("documentId", "6");
+                setParameter("parentCommentId", "15");
+            }
+
+            protected void updateModelValues() throws Exception {
+                assert getValue("#{documentHome.instance.id}").equals(6l);
+            }
+
+            protected void invokeApplication() throws Exception {
+
+                CommentHome commentHome = (CommentHome)getInstance(CommentHome.class);
+
+                commentHome.replyTo();
+
+                commentHome.getInstance().setFromUserName("Foo");
+                commentHome.getInstance().setFromUserHomepage("http://foo.bar");
+                commentHome.getInstance().setFromUserEmail("foo at bar.tld");
+                commentHome.getInstance().setSubject("Some Subject");
+                commentHome.getInstance().setContent("Some Content");
+
+                invokeMethod("#{commentHome.persist}");
+            }
+
+            protected void renderResponse() throws Exception {
+                CommentQuery commentQuery = (CommentQuery)getInstance(CommentQuery.class);
+                assert commentQuery.getComments().size() == 7;
+
+                assert commentQuery.getComments().get(0).getId().equals(10l);
+                assert commentQuery.getComments().get(1).getId().equals(11l);
+                assert commentQuery.getComments().get(2).getId().equals(12l);
+                assert commentQuery.getComments().get(3).getId().equals(13l);
+                assert commentQuery.getComments().get(4).getId().equals(14l);
+                assert commentQuery.getComments().get(5).getId().equals(15l);
+
+                assert commentQuery.getComments().get(6).getCreatedBy().getUsername().equals(User.GUEST_USERNAME);
+                assert commentQuery.getComments().get(6).getFromUserName().equals("Foo");
+                assert commentQuery.getComments().get(6).getFromUserHomepage().equals("http://foo.bar");
+                assert commentQuery.getComments().get(6).getFromUserEmail().equals("foo at bar.tld");
+                assert commentQuery.getComments().get(6).getSubject().equals("Some Subject");
+                assert commentQuery.getComments().get(6).getContent().equals("Some Content");
+                assert commentQuery.getComments().get(6).getParent().getId().equals(15l);
+
+                assert commentQuery.getComments().get(6).getName().matches("One\\.Comment[0-9]+");
+                assert !commentQuery.getComments().get(6).getWikiname().contains(" ");
+
+            }
+
+        }.run();
+    }
+
+    @Test
     public void deleteComment() throws Exception {
 
         loginAdmin();

Modified: trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml
===================================================================
--- trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/view/plugins/forumPosting/forumPostingHeader.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -45,6 +45,7 @@
                 </h:outputLink>
             </s:fragment>
 
+            <!-- TODO: Fix these http://jira.jboss.com/jira/browse/JBSEAM-2633
             <h:outputLink value="#{wikiURLRenderer.renderURL(docPager.previous)}"
                           rendered="#{not empty docPager.previous and docPager.previous.id != currentDirectory.defaultFile.id}"
                           accesskey="#{messages['forum.button.PreviousPosting.accesskey']}"
@@ -58,6 +59,7 @@
                           tabindex="1" styleClass="buttonNonpersistent">
                 <h:outputText styleClass="buttonLabel" escape="false" value="#{messages['forum.button.NextPosting']}"/>
             </h:outputLink>
+            -->
 
         </h:panelGroup>
 

Modified: trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/confirmationRegistration.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -2,7 +2,7 @@
             xmlns:m="http://jboss.com/products/seam/mail"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core">
-    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="X-Sent-From" value="JBoss Seam"/>
     <m:header name="Precedence" value="list"/>
     <m:from name="Seam Wiki" address="do-not-reply at jboss.com" />
     <m:to name="#{userHome.instance.fullname}">#{userHome.instance.email}</m:to>

Deleted: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -1,53 +0,0 @@
-<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:wiki="http://jboss.com/products/seam/wiki">
-    <m:header name="X-Sent-From" value="JBoss Seam" />
-    <m:header name="Precedence" value="list"/>
-    <m:from name="Seam Wiki" address="do-not-reply at jboss.com" />
-    <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
-    <m:subject>[Lacewiki] Forum Notification: #{currentDocument.name}</m:subject>
-    <m:body>
-        <html>
-            <body>
-            <p>Hello #{currentDocument.createdBy.firstname},</p>
-
-            <p>
-              you received a <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">response</a>
-              to <a href="#{wikiURLRenderer.renderURL(currentDocument)}">your posting</a> on the
-              Lacewiki forum, posted by #{replyHome.instance.createdBy.fullname}:
-            </p>
-
-            <hr/>
-
-            <wiki:formattedText value="#{replyHome.instance.content}"
-                                linkStyleClass="regularLink"
-                                brokenLinkStyleClass="brokenLink"
-                                attachmentLinkStyleClass="regularLink"
-                                thumbnailLinkStyleClass="regularLink"
-                                linkBaseFile="#{currentDocument}"
-                                currentAreaNumber="#{currentDocument.areaNumber}"
-                                enablePlugins="false"/>
-
-            <hr/>
-            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
-
-            </body>
-        </html>
-        <f:facet name="alternative">
-            <h:outputText>
-Hello #{currentDocument.createdBy.firstname},
-
-you received a response to your posting on the Seam community forum.
-
-From: #{replyHome.instance.createdBy.fullname}
-Subject:#{replyHome.instance.subject}
-
-Follow this link to read and reply:
-
-#{wikiURLRenderer.renderURL(replyHome.instance)}
-</h:outputText>
-        </f:facet>
-    </m:body>
-</m:message>

Copied: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml (from rev 7433, trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplies.xhtml)
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,53 @@
+<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:wiki="http://jboss.com/products/seam/wiki">
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+    <m:from name="Seam Wiki" address="do-not-reply at jboss.com" />
+    <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
+    <m:subject>[LaceWiki Forums] #{replyHome.instance.subject}</m:subject>
+    <m:body>
+        <html>
+            <body>
+            <p>Hello #{currentDocument.createdBy.firstname},</p>
+
+            <p>
+              you received a <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">response</a>
+              to <a href="#{wikiURLRenderer.renderURL(currentDocument)}">your posting</a> on the
+              LaceWiki forum, posted by #{replyHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{replyHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Hello #{currentDocument.createdBy.firstname},
+
+you received a response to your posting on the LaceWiki forum.
+
+From: #{replyHome.instance.createdBy.fullname}
+Subject:#{replyHome.instance.subject}
+
+Follow this link to read and reply:
+
+#{wikiURLRenderer.renderURL(replyHome.instance)}
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>


Property changes on: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,51 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(replyHome.instance.id, replyHome.instance.name)}">
+
+    <m:header name="In-Reply-To" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+    <m:header name="References" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{replyHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+
+    <m:to name="LaceWiki Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[LaceWiki Forums] #{replyHome.instance.subject}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              The <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">following reply</a>
+              was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument)}">#{currentDocument.name}</a>
+              by #{replyHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{replyHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Added: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,46 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(topicHome.instance.id, topicHome.instance.name)}">
+
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{topicHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+    <m:to name="LaceWiki Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[SeamFramework.org Forums] #{topicHome.instance.name}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              This <a href="#{wikiURLRenderer.renderURL(topicHome.instance)}">new topic</a> was posted
+              by #{topicHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{topicHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Added: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,53 @@
+<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:wiki="http://jboss.com/products/seam/wiki">
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+    <m:from name="Seam Wiki" address="do-not-reply at jboss.com" />
+    <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
+    <m:subject>[LaceWiki Forums] #{replyHome.instance.subject}</m:subject>
+    <m:body>
+        <html>
+            <body>
+            <p>Hello #{currentDocument.createdBy.firstname},</p>
+
+            <p>
+              you received a <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">response</a>
+              to <a href="#{wikiURLRenderer.renderURL(currentDocument)}">your posting</a> on the
+              LaceWiki forum, posted by #{replyHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{replyHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Hello #{currentDocument.createdBy.firstname},
+
+you received a response to your posting on the LaceWiki forum.
+
+From: #{replyHome.instance.createdBy.fullname}
+Subject:#{replyHome.instance.subject}
+
+Follow this link to read and reply:
+
+#{wikiURLRenderer.renderURL(replyHome.instance)}
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Added: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,51 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(replyHome.instance.id, replyHome.instance.name)}">
+
+    <m:header name="In-Reply-To" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+    <m:header name="References" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{replyHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+
+    <m:to name="LaceWiki Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[LaceWiki Forums] #{replyHome.instance.subject}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              The <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">following reply</a>
+              was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument)}">#{currentDocument.name}</a>
+              by #{replyHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{replyHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Added: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,46 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(topicHome.instance.id, topicHome.instance.name)}">
+
+    <m:header name="X-Sent-From" value="JBoss Seam" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{topicHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+    <m:to name="LaceWiki Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[SeamFramework.org Forums] #{topicHome.instance.name}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              This <a href="#{wikiURLRenderer.renderURL(topicHome.instance)}">new topic</a> was posted
+              by #{topicHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{topicHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css	2008-02-19 15:40:22 UTC (rev 7449)
@@ -712,7 +712,9 @@
 /* Comments
 -----------------------------------------------*/
 
-.commentColumn {}
+.commentColumn {
+    background-color: #fff;
+}
 
 .commentHeader {
     width: 100%;

Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml	2008-02-19 15:23:59 UTC (rev 7448)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -7,7 +7,7 @@
     <m:header name="Precedence" value="list"/>
     <m:from name="SeamFramework.org" address="do-not-reply at jboss.com" />
     <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
-    <m:subject>[SeamFramework.org] Forum Notification: #{currentDocument.name}</m:subject>
+    <m:subject>[SeamFramework.org Forums] #{replyHome.instance.subject}</m:subject>
     <m:body>
         <html>
             <body>

Added: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,50 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(replyHome.instance.id, replyHome.instance.name)}">
+
+    <m:header name="In-Reply-To" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+    <m:header name="References" value="#{wiki:calculateMessageId(currentDocument.id, currentDocument.name)}"/>
+
+    <m:header name="X-Sent-From" value="SeamFramework.org" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{replyHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+    <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[SeamFramework.org Forums] #{replyHome.instance.subject}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              The <a href="#{wikiURLRenderer.renderURL(replyHome.instance)}">following reply</a>
+              was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument)}">#{currentDocument.name}</a>
+              by #{replyHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{replyHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>

Added: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml	                        (rev 0)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml	2008-02-19 15:40:22 UTC (rev 7449)
@@ -0,0 +1,46 @@
+<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:wiki="http://jboss.com/products/seam/wiki"
+            messageId="#{wiki:calculateMessageId(topicHome.instance.id, topicHome.instance.name)}">
+
+    <m:header name="X-Sent-From" value="SeamFramework.org" />
+    <m:header name="Precedence" value="list"/>
+
+    <m:header name="From" value="#{topicHome.instance.createdBy.fullname} &lt;do-not-reply at jboss.com>"/>
+    <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+    <m:subject>[SeamFramework.org Forums] #{topicHome.instance.name}</m:subject>
+
+    <m:body>
+        <html>
+            <body>
+            <p>
+              This <a href="#{wikiURLRenderer.renderURL(topicHome.instance)}">new topic</a> was posted
+              by #{topicHome.instance.createdBy.fullname}:
+            </p>
+
+            <hr/>
+
+            <wiki:formattedText value="#{topicHome.instance.content}"
+                                linkStyleClass="regularLink"
+                                brokenLinkStyleClass="brokenLink"
+                                attachmentLinkStyleClass="regularLink"
+                                thumbnailLinkStyleClass="regularLink"
+                                linkBaseFile="#{currentDocument}"
+                                currentAreaNumber="#{currentDocument.areaNumber}"
+                                enablePlugins="false"/>
+
+            <hr/>
+            <h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
+
+            </body>
+        </html>
+        <f:facet name="alternative">
+            <h:outputText>
+Please see the HTML portion of this e-mail.
+</h:outputText>
+        </f:facet>
+    </m:body>
+</m:message>




More information about the seam-commits mailing list