[seam-commits] Seam SVN: r7457 - in trunk/examples/wiki: view/themes/sfwkorg/mailtemplates and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Feb 20 04:39:39 EST 2008
Author: christian.bauer at jboss.com
Date: 2008-02-20 04:39:39 -0500 (Wed, 20 Feb 2008)
New Revision: 7457
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
Log:
JBSEAM-2653, creation time should be persist() time
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-02-20 09:39:39 UTC (rev 7457)
@@ -129,9 +129,6 @@
syncFormContentToInstance(getParentNode());
syncLinks();
- // Set createdOn date _now_
- getInstance().setCreatedOn(new Date());
-
// Make a copy
historicalCopy = new WikiDocument();
historicalCopy.flatCopy(getInstance(), true);
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 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-20 09:39:39 UTC (rev 7457)
@@ -211,13 +211,12 @@
getLog().trace("linking new node with its parent node: " + getParentNode());
getInstance().setParent(getParentNode());
+ // Creation metadata
+ setCreatedMetadata();
+
// Wiki name conversion
setWikiName();
- // Set created by user
- getLog().trace("setting created by user: " + getCurrentUser());
- getInstance().setCreatedBy(getCurrentUser());
-
// Set its area number (if subclass didn't already set it)
if (getInstance().getAreaNumber() == null)
getInstance().setAreaNumber(getInstance().getParent().getAreaNumber());
@@ -241,7 +240,7 @@
if (!prepareUpdate()) return null;
- // Last modified metadata
+ // Modification metadata
setLastModifiedMetadata();
// Wiki name conversion
@@ -328,9 +327,15 @@
getInstance().setWikiname(WikiUtil.convertToWikiName(getInstance().getName()));
}
+ protected void setCreatedMetadata() {
+ getLog().trace("setting created metadata");
+ getInstance().setCreatedBy(getCurrentUser());
+ getInstance().setCreatedOn(new Date());
+ }
+
protected void setLastModifiedMetadata() {
getLog().trace("setting last modified metadata");
- getInstance().setLastModifiedBy(currentUser);
+ getInstance().setLastModifiedBy(getCurrentUser());
getInstance().setLastModifiedOn(new Date());
}
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-02-20 09:39:39 UTC (rev 7457)
@@ -14,7 +14,7 @@
<m:header name="From" value="#{replyHome.instance.createdBy.fullname} <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:subject>#{replyHome.instance.subject}</m:subject>
<m:body>
<html>
@@ -38,6 +38,7 @@
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+ <br/>
</body>
</html>
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-02-20 09:39:39 UTC (rev 7457)
@@ -11,7 +11,7 @@
<m:header name="From" value="#{topicHome.instance.createdBy.fullname} <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:subject>#{topicHome.instance.name}</m:subject>
<m:body>
<html>
@@ -34,6 +34,7 @@
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
+ <br/>
</body>
</html>
More information about the seam-commits
mailing list