Seam SVN: r8251 - in trunk: examples/numberguess/resources/WEB-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 08:18:34 -0400 (Wed, 21 May 2008)
New Revision: 8251
Modified:
trunk/examples/dvdstore/resources/WEB-INF/components.xml
trunk/examples/numberguess/resources/WEB-INF/components.xml
trunk/src/main/org/jboss/seam/bpm/Jbpm.java
Log:
Changes to examples to scan for pageflows, order pageflow parsing order
Modified: trunk/examples/dvdstore/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-05-21 12:16:37 UTC (rev 8250)
+++ trunk/examples/dvdstore/resources/WEB-INF/components.xml 2008-05-21 12:18:34 UTC (rev 8251)
@@ -19,15 +19,7 @@
<!-- 120 second conversation timeout -->
<core:manager conversation-timeout="120000"/>
- <bpm:jbpm>
- <bpm:process-definitions>
- <value>ordermanagement1.jpdl.xml</value>
- </bpm:process-definitions>
- <bpm:pageflow-definitions>
- <value>checkout.jpdl.xml</value>
- <value>newuser.jpdl.xml</value>
- </bpm:pageflow-definitions>
- </bpm:jbpm>
+ <bpm:jbpm />
<security:identity authenticate-method="#{authenticator.authenticate}"/>
Modified: trunk/examples/numberguess/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/numberguess/resources/WEB-INF/components.xml 2008-05-21 12:16:37 UTC (rev 8250)
+++ trunk/examples/numberguess/resources/WEB-INF/components.xml 2008-05-21 12:18:34 UTC (rev 8251)
@@ -10,11 +10,6 @@
<property name="maxGuesses">10</property>
</component>
- <bpm:jbpm>
- <bpm:pageflow-definitions>
- <value>cheat.jpdl.xml</value>
- <value>pageflow.jpdl.xml</value>
- </bpm:pageflow-definitions>
- </bpm:jbpm>
+ <bpm:jbpm />
</components>
Modified: trunk/src/main/org/jboss/seam/bpm/Jbpm.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-05-21 12:16:37 UTC (rev 8250)
+++ trunk/src/main/org/jboss/seam/bpm/Jbpm.java 2008-05-21 12:18:34 UTC (rev 8251)
@@ -10,6 +10,7 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
+import java.util.TreeSet;
import javax.naming.NamingException;
@@ -41,6 +42,7 @@
import org.jbpm.graph.node.ProcessState;
import org.jbpm.graph.node.SubProcessResolver;
import org.jbpm.instantiation.UserCodeInterceptorConfig;
+import org.jbpm.jpdl.JpdlException;
import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator;
import org.jbpm.persistence.db.DbPersistenceServiceFactory;
import org.xml.sax.InputSource;
@@ -156,7 +158,14 @@
{
throw new IllegalArgumentException("pageflow resource not found: " + resourceName);
}
- return Jbpm.parseInputSource( new InputSource(resource) );
+ try
+ {
+ return Jbpm.parseInputSource( new InputSource(resource) );
+ }
+ catch (JpdlException e)
+ {
+ throw new JpdlException("Unable to parse process definition " + resourceName, e);
+ }
}
public ProcessDefinition getProcessDefinitionFromResource(String resourceName)
@@ -232,7 +241,8 @@
}
private void installPageflowDefinitions() {
- Set<String> mergedPageflowDefinitions = ((PageflowDeploymentHandler) ((DeploymentStrategy) Contexts.getEventContext().get(StandardDeploymentStrategy.NAME)).getDeploymentHandlers().get(PageflowDeploymentHandler.NAME)).getPageflowDefinitions();
+ Set<String> mergedPageflowDefinitions = new TreeSet<String>();
+ mergedPageflowDefinitions.addAll(((PageflowDeploymentHandler) ((DeploymentStrategy) Contexts.getEventContext().get(StandardDeploymentStrategy.NAME)).getDeploymentHandlers().get(PageflowDeploymentHandler.NAME)).getPageflowDefinitions());
if ( pageflowDefinitions!=null )
{
mergedPageflowDefinitions.addAll(Arrays.asList(pageflowDefinitions));
@@ -321,7 +331,7 @@
try
{
return new PageflowParser(inputSource).readProcessDefinition();
- }
+ }
finally
{
jbpmContext.close();
16 years, 7 months
Seam SVN: r8250 - trunk/examples.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 08:16:37 -0400 (Wed, 21 May 2008)
New Revision: 8250
Modified:
trunk/examples/build.xml
Log:
move location of jpdl files in deployed archive to be detected automatically
Modified: trunk/examples/build.xml
===================================================================
--- trunk/examples/build.xml 2008-05-21 11:22:26 UTC (rev 8249)
+++ trunk/examples/build.xml 2008-05-21 12:16:37 UTC (rev 8250)
@@ -390,6 +390,7 @@
<include name="META-INF/security-config.xml" />
<include name="META-INF/security-rules.drl" />
<include name="META-INF/standard-jaxws-endpoint-config.xml" />
+ <include name="*.jpdl.xml" />
</fileset>
<!-- resources to go in the jar for tomcat -->
@@ -425,7 +426,7 @@
</fileset>
<!-- Property resources (e.g. themes, i8ln) get put on the classpath -->
- <fileset id="properties" dir="${resources.dir}">
+ <fileset id="war.classes.resources" dir="${resources.dir}">
<exclude name="seam.properties" />
<exclude name="components.properties" />
<include name="*.properties" />
@@ -589,7 +590,7 @@
</copy>
<!-- Put properties into the classpath -->
<copy todir="${war.dir}/WEB-INF/classes">
- <fileset refid="properties" />
+ <fileset refid="war.classes.resources" />
</copy>
</target>
16 years, 7 months
Seam SVN: r8249 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 07:22:26 -0400 (Wed, 21 May 2008)
New Revision: 8249
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java
Log:
Updates related to statusMessages
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java 2008-05-21 11:19:32 UTC (rev 8248)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiSecurityEvents.java 2008-05-21 11:22:26 UTC (rev 8249)
@@ -6,14 +6,13 @@
*/
package org.jboss.seam.wiki.core.ui;
-import org.jboss.seam.security.FacesSecurityEvents;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.international.StatusMessage;
+import org.jboss.seam.security.FacesSecurityEvents;
-import javax.faces.application.FacesMessage;
-
/**
* Overrides the "login failed" message and turns it into a WARN (we don't want INFO here).
*
@@ -25,7 +24,8 @@
@Startup
public class WikiSecurityEvents extends FacesSecurityEvents {
- public FacesMessage.Severity getLoginFailedMessageSeverity() {
- return FacesMessage.SEVERITY_WARN;
+ @Override
+ public StatusMessage.Severity getLoginFailedMessageSeverity() {
+ return StatusMessage.Severity.WARN;
}
}
16 years, 7 months
Seam SVN: r8248 - trunk/examples/wiki/src/main/org/jboss/seam/wiki.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-21 07:19:32 -0400 (Wed, 21 May 2008)
New Revision: 8248
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
Log:
Optional extended session lifetime for authenticated users
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-05-21 10:39:00 UTC (rev 8247)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/WikiInit.java 2008-05-21 11:19:32 UTC (rev 8248)
@@ -36,6 +36,7 @@
private String adminContact;
private boolean debug;
private boolean hibernateStatistics = true;
+ private int authenticatedSessionTimeoutMinutes = 0;
@In(required = false)
DBUnitImporter dbunitImporter;
@@ -110,6 +111,14 @@
this.hibernateStatistics = hibernateStatistics;
}
+ public int getAuthenticatedSessionTimeoutMinutes() {
+ return authenticatedSessionTimeoutMinutes;
+ }
+
+ public void setAuthenticatedSessionTimeoutMinutes(int authenticatedSessionTimeoutMinutes) {
+ this.authenticatedSessionTimeoutMinutes = authenticatedSessionTimeoutMinutes;
+ }
+
/** Utility to debug JBoss JNDI problems */
public static String listJNDITree(String namespace) {
StringBuffer buffer = new StringBuffer(4096);
16 years, 7 months
Seam SVN: r8247 - in trunk/src/main/org/jboss/seam: framework and 3 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 06:39:00 -0400 (Wed, 21 May 2008)
New Revision: 8247
Modified:
trunk/src/main/org/jboss/seam/faces/Navigator.java
trunk/src/main/org/jboss/seam/framework/Controller.java
trunk/src/main/org/jboss/seam/framework/Home.java
trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
trunk/src/main/org/jboss/seam/pageflow/Pageflow.java
trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
Log:
Updates related to statusMessages
Modified: trunk/src/main/org/jboss/seam/faces/Navigator.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/Navigator.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/faces/Navigator.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -82,6 +82,7 @@
}
}
+ @SuppressWarnings("deprecation")
protected static void addFacesMessage(String message, Severity severity, String control, Object... params)
{
if ( Contexts.isConversationContextActive() )
Modified: trunk/src/main/org/jboss/seam/framework/Controller.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Controller.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/framework/Controller.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -22,6 +22,7 @@
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.faces.Validation;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;
import org.jboss.seam.transaction.Transaction;
@@ -71,11 +72,17 @@
return Conversation.instance();
}
+ @Deprecated
protected FacesMessages getFacesMessages()
{
return FacesMessages.instance();
}
+ protected StatusMessages getStatusMessages()
+ {
+ return StatusMessages.instance();
+ }
+
protected Identity getIdentity()
{
return Identity.instance();
Modified: trunk/src/main/org/jboss/seam/framework/Home.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Home.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/framework/Home.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -1,6 +1,6 @@
package org.jboss.seam.framework;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -51,7 +51,7 @@
protected void updatedMessage()
{
debug("updated entity #0 #1", getEntityClass().getName(), getId());
- getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getUpdatedMessageKey(), getUpdatedMessage() );
+ getStatusMessages().addFromResourceBundleOrDefault( INFO, getUpdatedMessageKey(), getUpdatedMessage() );
}
/**
@@ -69,7 +69,7 @@
protected void deletedMessage()
{
debug("deleted entity #0 #1", getEntityClass().getName(), getId());
- getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getDeletedMessageKey(), getDeletedMessage() );
+ getStatusMessages().addFromResourceBundleOrDefault( INFO, getDeletedMessageKey(), getDeletedMessage() );
}
/**
@@ -87,7 +87,7 @@
protected void createdMessage()
{
debug("created entity #0 #1", getEntityClass().getName(), getId());
- getFacesMessages().addFromResourceBundleOrDefault( SEVERITY_INFO, getCreatedMessageKey(), getCreatedMessage() );
+ getStatusMessages().addFromResourceBundleOrDefault( INFO, getCreatedMessageKey(), getCreatedMessage() );
}
/**
Modified: trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java
===================================================================
--- trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/jsf/SeamPhaseListener.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -15,7 +15,6 @@
import java.lang.reflect.Method;
import java.util.Map;
-import javax.faces.application.FacesMessage;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
@@ -37,6 +36,7 @@
import org.jboss.seam.faces.FacesPage;
import org.jboss.seam.faces.Switcher;
import org.jboss.seam.faces.Validation;
+import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
@@ -445,7 +445,7 @@
if ( Transaction.instance().isRolledBackOrMarkedRollback() )
{
FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ StatusMessage.Severity.WARN,
"org.jboss.seam.TransactionFailed",
"Transaction failed"
);
Modified: trunk/src/main/org/jboss/seam/pageflow/Pageflow.java
===================================================================
--- trunk/src/main/org/jboss/seam/pageflow/Pageflow.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/pageflow/Pageflow.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -5,7 +5,6 @@
import java.io.Serializable;
import java.util.List;
-import javax.faces.application.FacesMessage;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
@@ -23,8 +22,9 @@
import org.jboss.seam.core.AbstractMutable;
import org.jboss.seam.core.Events;
import org.jboss.seam.faces.FacesManager;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.FacesPage;
+import org.jboss.seam.international.StatusMessage;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
@@ -158,8 +158,8 @@
*/
protected void illegalNavigation()
{
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
"org.jboss.seam.IllegalNavigation",
"Illegal navigation"
);
Modified: trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/UserAction.java 2008-05-21 10:30:30 UTC (rev 8246)
+++ trunk/src/main/org/jboss/seam/security/management/action/UserAction.java 2008-05-21 10:39:00 UTC (rev 8247)
@@ -11,7 +11,7 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Conversation;
-import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.security.management.IdentityManager;
/**
@@ -67,7 +67,7 @@
{
if (!password.equals(confirm))
{
- FacesMessages.instance().addToControl("password", "Passwords do not match");
+ StatusMessages.instance().addToControl("password", "Passwords do not match");
return "failure";
}
@@ -100,7 +100,7 @@
{
if (!password.equals(confirm))
{
- FacesMessages.instance().addToControl("password", "Passwords do not match");
+ StatusMessages.instance().addToControl("password", "Passwords do not match");
return "failure";
}
else
16 years, 7 months
Seam SVN: r8246 - trunk/src/main/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 06:30:30 -0400 (Wed, 21 May 2008)
New Revision: 8246
Modified:
trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java
Log:
Move facesMessages -> statusMessages
Modified: trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java 2008-05-21 09:59:25 UTC (rev 8245)
+++ trunk/src/main/org/jboss/seam/security/FacesSecurityEvents.java 2008-05-21 10:30:30 UTC (rev 8246)
@@ -3,8 +3,6 @@
import static org.jboss.seam.ScopeType.APPLICATION;
import static org.jboss.seam.annotations.Install.BUILT_IN;
-import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
import javax.faces.context.FacesContext;
import javax.security.auth.login.LoginException;
@@ -14,8 +12,9 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.Selector;
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage.Severity;
/**
* Produces FacesMessages for certain security events, and decouples the
@@ -83,7 +82,7 @@
@Observer(Identity.EVENT_LOGIN_FAILED)
public void addLoginFailedMessage(LoginException ex)
{
- FacesMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessages.instance().addFromResourceBundleOrDefault(
getLoginFailedMessageSeverity(),
getLoginFailedMessageKey(),
getLoginFailedMessage(),
@@ -97,7 +96,7 @@
public Severity getLoginFailedMessageSeverity()
{
- return FacesMessage.SEVERITY_INFO;
+ return Severity.INFO;
}
public String getLoginFailedMessageKey()
@@ -108,7 +107,7 @@
@Observer(Identity.EVENT_LOGIN_SUCCESSFUL)
public void addLoginSuccessfulMessage()
{
- FacesMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessages.instance().addFromResourceBundleOrDefault(
getLoginSuccessfulMessageSeverity(),
getLoginSuccessfulMessageKey(),
getLoginSuccessfulMessage(),
@@ -118,8 +117,8 @@
@Observer(Identity.EVENT_NOT_LOGGED_IN)
public void addNotLoggedInMessage()
{
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ Severity.WARN,
"org.jboss.seam.NotLoggedIn",
"Please log in first"
);
@@ -127,7 +126,7 @@
public Severity getLoginSuccessfulMessageSeverity()
{
- return FacesMessage.SEVERITY_INFO;
+ return Severity.INFO;
}
public String getLoginSuccessfulMessage()
@@ -143,8 +142,8 @@
@Observer(Identity.EVENT_ALREADY_LOGGED_IN)
public void addAlreadyLoggedInMessage()
{
- FacesMessages.instance().addFromResourceBundleOrDefault (
- FacesMessage.SEVERITY_WARN,
+ StatusMessages.instance().addFromResourceBundleOrDefault (
+ Severity.WARN,
"org.jboss.seam.AlreadyLoggedIn",
"You are already logged in, please log out first if you wish to log in again"
);
16 years, 7 months
Seam SVN: r8245 - in trunk/src/main/org/jboss/seam: faces and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-05-21 05:59:25 -0400 (Wed, 21 May 2008)
New Revision: 8245
Removed:
trunk/src/main/org/jboss/seam/faces/BusinessProcess.java
Modified:
trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
Log:
Move facesMessages -> statusMessages
Modified: trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java
===================================================================
--- trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-21 09:44:51 UTC (rev 8244)
+++ trunk/src/main/org/jboss/seam/bpm/BusinessProcess.java 2008-05-21 09:59:25 UTC (rev 8245)
@@ -13,6 +13,8 @@
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.AbstractMutable;
import org.jboss.seam.core.Events;
+import org.jboss.seam.international.StatusMessage;
+import org.jboss.seam.international.StatusMessages;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
import org.jbpm.taskmgmt.exe.TaskInstance;
@@ -361,33 +363,64 @@
protected void taskNotFound(Long taskId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.TaskNotFound",
+ "Task #0 not found",
+ taskId
+ );
}
protected void taskEnded(Long taskId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.TaskEnded",
+ "Task #0 already ended",
+ taskId
+ );
}
protected void processEnded(Long processId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessEnded",
+ "Process #0 already ended",
+ processId
+ );
}
protected void processNotFound(Long processId)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessNotFound",
+ "Process #0 not found",
+ processId
+ );
}
protected void processEnded(String key)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessEnded",
+ "Process #0 already ended",
+ key
+ );
}
protected void processNotFound(String key)
{
-
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ StatusMessage.Severity.WARN,
+ "org.jboss.seam.ProcessNotFound",
+ "Process #0 not found",
+ key
+ );
}
+
@Override
public String toString()
Deleted: trunk/src/main/org/jboss/seam/faces/BusinessProcess.java
===================================================================
--- trunk/src/main/org/jboss/seam/faces/BusinessProcess.java 2008-05-21 09:44:51 UTC (rev 8244)
+++ trunk/src/main/org/jboss/seam/faces/BusinessProcess.java 2008-05-21 09:59:25 UTC (rev 8245)
@@ -1,93 +0,0 @@
-package org.jboss.seam.faces;
-
-import static org.jboss.seam.annotations.Install.FRAMEWORK;
-
-import javax.faces.application.FacesMessage;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-
-/**
- * Holds the task and process ids for the current conversation,
- * and provides programmatic control over the business process.
- *
- * @author Gavin King
- *
- */
-(a)Scope(ScopeType.CONVERSATION)
-@Name("org.jboss.seam.bpm.businessProcess")
-@BypassInterceptors
-@Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=FRAMEWORK, classDependencies="javax.faces.context.FacesContext")
-public class BusinessProcess extends org.jboss.seam.bpm.BusinessProcess
-{
-
- @Override
- protected void taskNotFound(Long taskId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.TaskNotFound",
- "Task #0 not found",
- taskId
- );
- }
-
- @Override
- protected void taskEnded(Long taskId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.TaskEnded",
- "Task #0 already ended",
- taskId
- );
- }
-
- @Override
- protected void processEnded(Long processId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessEnded",
- "Process #0 already ended",
- processId
- );
- }
-
- @Override
- protected void processNotFound(Long processId)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessNotFound",
- "Process #0 not found",
- processId
- );
- }
-
- @Override
- protected void processEnded(String key)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessEnded",
- "Process #0 already ended",
- key
- );
- }
-
- @Override
- protected void processNotFound(String key)
- {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
- "org.jboss.seam.ProcessNotFound",
- "Process #0 not found",
- key
- );
- }
-
-}
16 years, 7 months
Seam SVN: r8244 - in trunk/examples/wiki/src: etc/WEB-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-21 05:44:51 -0400 (Wed, 21 May 2008)
New Revision: 8244
Modified:
trunk/examples/wiki/src/etc/META-INF/components-dev.xml
trunk/examples/wiki/src/etc/META-INF/components-prod.xml
trunk/examples/wiki/src/etc/META-INF/components-test.xml
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/etc/WEB-INF/web.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
Log:
Optional extended session lifetime for authenticated users
Modified: trunk/examples/wiki/src/etc/META-INF/components-dev.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/etc/META-INF/components-dev.xml 2008-05-21 09:44:51 UTC (rev 8244)
@@ -26,6 +26,7 @@
<property name="appname">lacewiki</property>
<property name="adminContact">+41 123 123 123, admin(a)my.address</property>
<property name="debug">true</property>
+ <property name="authenticatedSessionTimeoutMinutes">180</property>
</component>
<!-- Mailserver for notification messages -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-prod.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/etc/META-INF/components-prod.xml 2008-05-21 09:44:51 UTC (rev 8244)
@@ -26,6 +26,7 @@
<property name="appname">lacewiki</property>
<property name="adminContact">+41 123 123 123, admin(a)my.address</property>
<property name="debug">false</property>
+ <property name="authenticatedSessionTimeoutMinutes">180</property>
</component>
<!-- Mailserver for notification messages -->
Modified: trunk/examples/wiki/src/etc/META-INF/components-test.xml
===================================================================
--- trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/etc/META-INF/components-test.xml 2008-05-21 09:44:51 UTC (rev 8244)
@@ -26,6 +26,7 @@
<property name="appname">lacewiki</property>
<property name="adminContact">+41 123 123 123, admin(a)my.address</property>
<property name="debug">true</property>
+ <property name="authenticatedSessionTimeoutMinutes">180</property>
</component>
<!-- Mailserver for notification messages -->
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-21 09:44:51 UTC (rev 8244)
@@ -125,7 +125,7 @@
<factory name="skin" scope="SESSION" value="d"/>
- <factory name="sessionTimeoutSeconds" scope="SESSION"
+ <factory name="sessionTimeoutSeconds" scope="EVENT"
value="#{facesContext.externalContext.getSession(true).getMaxInactiveInterval()}"/>
<factory name="currentPreferencesUser" scope="EVENT"
Modified: trunk/examples/wiki/src/etc/WEB-INF/web.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/etc/WEB-INF/web.xml 2008-05-21 09:44:51 UTC (rev 8244)
@@ -128,9 +128,9 @@
<!-- Misc Settings -->
- <!-- Session timeout: half hour (careful, large and long sessions need heap size>-->
+ <!-- Session timeout,can be extended for authenticated users in components.xml! -->
<session-config>
- <session-timeout>30</session-timeout>
+ <session-timeout>10</session-timeout>
</session-config>
</web-app>
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-05-21 08:11:08 UTC (rev 8243)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/Authenticator.java 2008-05-21 09:44:51 UTC (rev 8244)
@@ -23,6 +23,7 @@
import org.jboss.seam.wiki.core.model.Role;
import org.jboss.seam.wiki.util.Hash;
import org.jboss.seam.wiki.util.WikiUtil;
+import org.jboss.seam.wiki.WikiInit;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
@@ -30,6 +31,8 @@
@Name("authenticator")
public class Authenticator {
+ protected final static String REGULAR_SESSION_MAX_INACTIVE_SECONDS = "regularSessionMaxInactiveInterval";
+
@Logger
Log log;
@@ -197,11 +200,22 @@
@Observer("org.jboss.seam.security.loginSuccessful")
public void extendSessionTime() {
- //ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(LONG_SESSION_TIME);
+ // Store the regular session timeout value, so we can set it back later on logout
+ int regularSessionTimeout = ServletContexts.getInstance().getRequest().getSession().getMaxInactiveInterval();
+ Contexts.getSessionContext().set(REGULAR_SESSION_MAX_INACTIVE_SECONDS, regularSessionTimeout);
+ WikiInit init = (WikiInit)Component.getInstance(WikiInit.class);
+ if (init.getAuthenticatedSessionTimeoutMinutes() != 0) {
+ log.debug("setting timeout of authenticated user session to minutes: " + init.getAuthenticatedSessionTimeoutMinutes());
+ ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(
+ init.getAuthenticatedSessionTimeoutMinutes()*60
+ );
+ }
}
@Observer("org.jboss.seam.security.loggedOut")
public void resetSessionTime() {
- //ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(STD_SESSION_TIME);
+ int regularSessionTimeout = (Integer) Contexts.getSessionContext().get(REGULAR_SESSION_MAX_INACTIVE_SECONDS);
+ log.debug("resetting timeout of user session after logout to minutes: " + regularSessionTimeout/60);
+ ServletContexts.getInstance().getRequest().getSession().setMaxInactiveInterval(regularSessionTimeout);
}
}
16 years, 7 months
Seam SVN: r8243 - trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-21 04:11:08 -0400 (Wed, 21 May 2008)
New Revision: 8243
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
Log:
Outdated feed entries are purged on persist, not only on update
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-05-21 07:38:53 UTC (rev 8242)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-05-21 08:11:08 UTC (rev 8243)
@@ -171,6 +171,8 @@
historicalCopy = new WikiDocument();
historicalCopy.flatCopy(getInstance(), true);
+ purgeFeedEntries();
+
return true;
}
@@ -221,11 +223,7 @@
setPushOnSiteFeed(false);
}
- // Feeds should not be removed by a maintenance thread: If there
- // is no activity on the site, feeds shouldn't be empty but show the last updates.
- Calendar oldestDate = GregorianCalendar.getInstance();
- oldestDate.add(Calendar.DAY_OF_YEAR, -Preferences.instance().get(WikiPreferences.class).getPurgeFeedEntriesAfterDays().intValue());
- feedDAO.purgeOldFeedEntries(oldestDate.getTime());
+ purgeFeedEntries();
// Write history log and prepare a new copy for further modification
if (!isMinorRevision()) {
@@ -367,6 +365,14 @@
return "wikiDocumentFeedEntryManager";
}
+ protected void purgeFeedEntries() {
+ // Feeds should not be removed by a maintenance thread: If there
+ // is no activity on the site, feeds shouldn't be empty but show the last updates.
+ Calendar oldestDate = GregorianCalendar.getInstance();
+ oldestDate.add(Calendar.DAY_OF_YEAR, -Preferences.instance().get(WikiPreferences.class).getPurgeFeedEntriesAfterDays().intValue());
+ feedDAO.purgeOldFeedEntries(oldestDate.getTime());
+ }
+
/* -------------------------- Public Features ------------------------------ */
// TODO: We need to duplicate this here, otherwise it will only validated on persist(): http://jira.jboss.com/jira/browse/JBSEAM-2671
16 years, 7 months
Seam SVN: r8242 - in trunk/examples/wiki: src/main/org/jboss/seam/wiki/core/action and 31 other directories.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-05-21 03:38:53 -0400 (Wed, 21 May 2008)
New Revision: 8242
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptchaValidator.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheInvalidator.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
Removed:
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/forumNotifyReply.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
Modified:
trunk/examples/wiki/src/etc/WEB-INF/components.xml
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java
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/src/main/org/jboss/seam/wiki/core/action/PluginPreferenceEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PreferenceEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserSearch.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptcha.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/Uploader.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/ZipImporter.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/blosxom/BlosxomImporter.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/AbstractImporter.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml
trunk/examples/wiki/view/dirEdit_d.xhtml
trunk/examples/wiki/view/includes/breadcrumb.xhtml
trunk/examples/wiki/view/includes/captchaEntry.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
Log:
More fragment caching, deprecated FacesMessages, captcha improvements, minor fixes
Modified: trunk/examples/wiki/src/etc/WEB-INF/components.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/etc/WEB-INF/components.xml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -24,6 +24,13 @@
<!-- Persistence stuff -->
+ <persistence:managed-persistence-context
+ name="entityManager"
+ auto-create="true"
+ entity-manager-factory="#{wikiEntityManagerFactory}"
+ persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
+ </persistence:managed-persistence-context>
+
<persistence:filter name="accessLevelFilter">
<persistence:name>accessLevelFilter</persistence:name>
<persistence:parameters>
@@ -36,51 +43,18 @@
class="org.jboss.seam.wiki.core.dao.WikiManagedPersistenceContext">
<property name="entityManagerFactory">#{wikiEntityManagerFactory}</property>
<property name="persistenceUnitJndiName">java:/entityManagerFactories/wiki</property>
- <property name="filters">
- <value>#{accessLevelFilter}</value>
- </property>
+ <property name="filters"><value>#{accessLevelFilter}</value></property>
</component>
- <!-- TODO: I want to reset the filter argument when a user logs in, so had to write my own SMPC, this is only
- "safe" because a logged-in user means higher access privileges than before, so anything that was
- cached in the SMPC before the filter argument is reset has to be still valid. We hope...
- <persistence:managed-persistence-context name="restrictedEntityManager"
- auto-create="true"
- entity-manager-factory="#{wikiEntityManagerFactory}"
- persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
- <persistence:filters><value>#{accessLevelFilter}</value></persistence:filters>
- </persistence:managed-persistence-context>
- -->
- <persistence:managed-persistence-context name="entityManager"
- auto-create="true"
- entity-manager-factory="#{wikiEntityManagerFactory}"
- persistence-unit-jndi-name="java:/entityManagerFactories/wiki">
- </persistence:managed-persistence-context>
+ <!-- JSF entity instance from/to string converters for select lists -->
- <!--
- <component name="restrictedEntityConverter" scope="CONVERSATION" precedence="20"
- class="org.jboss.seam.ui.converter.EntityConverter">
- <property name="entityManager">#{restrictedEntityManager}</property>
- </component>
-
- <component name="entityConverter" scope="CONVERSATION" precedence="20"
- class="org.jboss.seam.ui.converter.EntityConverter">
- <property name="entityManager">#{entityManager}</property>
- </component>
-
- <component name="nestedSetNodeWrapperRestrictedEntityConverter" scope="CONVERSATION" precedence="20"
- class="org.jboss.seam.wiki.core.nestedset.ui.NestedSetNodeWrapperEntityConverter">
- <property name="entityManager">#{restrictedEntityManager}</property>
- </component>
- -->
-
<ui:entity-converter name="entityConverter"
scope="CONVERSATION" precedence="20" entity-loader="#{regularEntityLoader}"/>
- <ui:entity-loader name="regularEntityLoader" entity-manager="#{entityManager}"/>
+ <ui:jpa-entity-loader name="regularEntityLoader" entity-manager="#{entityManager}"/>
<ui:entity-converter name="restrictedEntityConverter"
scope="CONVERSATION" precedence="20" entity-loader="#{restrictedEntityLoader}"/>
- <ui:entity-loader name="restrictedEntityLoader" entity-manager="#{restrictedEntityManager}"/>
+ <ui:jpa-entity-loader name="restrictedEntityLoader" entity-manager="#{restrictedEntityManager}"/>
<ui:entity-converter name="nestedSetNodeWrapperRestrictedEntityConverter"
class="org.jboss.seam.wiki.core.nestedset.ui.NestedSetNodeWrapperEntityConverter"
@@ -105,6 +79,8 @@
<property name="cacheRegions">
<value>wiki.MainMenu</value>
<value>wiki.Breadcrumb</value>
+ <value>wiki.Comment</value>
+ <value>wiki.Signature</value>
</property>
</component>
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/AdminHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -8,6 +8,8 @@
import org.hibernate.validator.InvalidValue;
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.datamodel.DataModelSelection;
@@ -15,7 +17,6 @@
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Validators;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.AuthorizationException;
import org.jboss.seam.security.Identity;
@@ -30,7 +31,6 @@
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
import org.jboss.seam.wiki.util.Progress;
-import javax.faces.application.FacesMessage;
import javax.persistence.EntityManager;
import java.io.Serializable;
import java.util.ArrayList;
@@ -46,7 +46,7 @@
static Log log;
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@In
EntityManager entityManager;
@@ -71,8 +71,8 @@
log.debug("flushing the entityManager (maybe again)");
entityManager.flush(); // Flush everything (maybe again if prefEditor.save() already flushed)
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ StatusMessage.Severity.INFO,
"lacewiki.msg.SystemSettingsUpdated",
"System settings updated"
);
@@ -123,7 +123,7 @@
InvalidValue[] ivs = validator.getInvalidValues(linkProtocol);
if (ivs.length>0) {
for (InvalidValue iv : ivs) {
- facesMessages.addToControl(iv.getPropertyName(), FacesMessage.SEVERITY_INFO, iv.getMessage());
+ statusMessages.addToControl(iv.getPropertyName(), StatusMessage.Severity.INFO, iv.getMessage());
}
return;
}
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-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -14,6 +14,7 @@
import org.jboss.seam.core.Events;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
@@ -24,8 +25,9 @@
import org.jboss.seam.wiki.core.ui.WikiRedirect;
import org.jboss.seam.wiki.util.WikiUtil;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+
import javax.faces.validator.ValidatorException;
import java.util.Date;
@@ -173,8 +175,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Comment.Persist",
"Comment '{0}' has been saved.",
getInstance().getSubject()
@@ -183,8 +185,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Comment.Update",
"Comment '{0}' has been updated.",
getInstance().getSubject()
@@ -193,8 +195,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Comment.Delete",
"Comment '{0}' has been deleted.",
getInstance().getSubject()
@@ -207,15 +209,16 @@
/* -------------------------- Internal Methods ------------------------------ */
+ // TODO: Why again are we using a different validator here for the text editor?
protected boolean validateContent() {
FormattedTextValidator validator = new FormattedTextValidator();
try {
validator.validate(null, null, getInstance().getContent());
} catch (ValidatorException e) {
// TODO: Needs to use resource bundle, how?
- getFacesMessages().addToControl(
+ StatusMessages.instance().addToControl(
getTextAreaId(),
- FacesMessage.SEVERITY_WARN,
+ WARN,
e.getFacesMessage().getSummary()
);
return false;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryBrowser.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -12,8 +12,8 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.model.*;
@@ -27,8 +27,9 @@
import org.richfaces.event.NodeExpandedEvent;
import org.richfaces.event.NodeSelectedEvent;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
-import static javax.faces.application.FacesMessage.SEVERITY_WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import javax.persistence.EntityManager;
import java.io.Serializable;
import java.util.*;
@@ -49,7 +50,7 @@
Clipboard clipboard;
@In
- FacesMessages facesMessages;
+ StatusMessages statusMessages;
@In
EntityManager restrictedEntityManager;
@@ -306,9 +307,9 @@
if (!wikiNodeDAO.isUniqueWikiname(getInstance().getAreaNumber(), WikiUtil.convertToWikiName(pastedName))) {
log.debug("wikiname is not unique, renaming");
if (pastedName.length() > 245) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"name",
- SEVERITY_WARN,
+ WARN,
"lacewiki.msg.Clipboard.DuplicatePasteNameFailure",
"The name '{0}' was already in use in this area and is too long to be renamed, skipping paste.",
pastedName
@@ -324,9 +325,9 @@
}
pastedName = attemptedName;
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"name",
- SEVERITY_INFO,
+ INFO,
"lacewiki.msg.Clipboard.DuplicatePasteName",
"The name '{0}' was already in use in this area, renamed item to '{1}'.",
n.getName(), pastedName
@@ -401,8 +402,8 @@
}
restrictedEntityManager.flush();
- facesMessages.addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Trash.Emptied",
"All items in the trash have been permanently deleted."
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DirectoryHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -13,6 +13,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.feeds.FeedDAO;
import org.jboss.seam.wiki.core.model.WikiDirectory;
@@ -21,8 +22,8 @@
import org.jboss.seam.wiki.core.model.WikiNode;
import org.jboss.seam.wiki.util.WikiUtil;
-import javax.faces.application.FacesMessage;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.*;
/**
@@ -131,8 +132,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Directory.Persist",
"Directory '{0}' has been saved.",
getInstance().getName()
@@ -141,8 +142,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Directory.Update",
"Directory '{0}' has been updated.",
getInstance().getName()
@@ -151,8 +152,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Directory.Delete",
"Directory '{0}' has been deleted.",
getInstance().getName()
@@ -160,15 +161,15 @@
}
protected void feedCreatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Feed.Create",
"Created syndication feed for this directory");
}
protected void feedRemovedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Feed.Remove",
"Removed syndication feed of this directory");
}
@@ -184,7 +185,8 @@
/* -------------------------- Internal Methods ------------------------------ */
private void refreshAvailableMenuItems(WikiDirectory dir) {
- availableMenuItems = new TreeSet();
+ if (availableMenuItems == null) availableMenuItems = new TreeSet();
+ availableMenuItems.clear();
availableMenuItems.addAll(getWikiNodeDAO().findChildWikiDirectories(dir));
availableMenuItems.removeAll(alreadyUsedMenuItems);
}
@@ -250,8 +252,8 @@
getLog().debug("resetting feed of directory");
getInstance().getFeed().getFeedEntries().clear();
getInstance().getFeed().setPublishedDate(new Date());
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Feed.Reset",
"Queued removal of all feed entries from the syndication feed of this directory, please update to finalize");
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHistory.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,12 +1,11 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.datamodel.DataModelSelection;
import org.jboss.seam.annotations.security.Restrict;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.security.AuthorizationException;
import org.jboss.seam.security.Identity;
@@ -16,7 +15,9 @@
import org.jboss.seam.wiki.util.Diff;
import org.jboss.seam.wiki.util.WikiUtil;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.io.Serializable;
import java.util.List;
@@ -42,7 +43,7 @@
WikiNodeDAO wikiNodeDAO;
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@DataModel
private List<WikiFile> historicalFileList;
@@ -115,8 +116,8 @@
displayedHistoricalFile = selectedHistoricalFile;
diffResult = null;
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.DiffOldVersionDisplayed",
"Showing historical revision {0}",
selectedHistoricalFile.getRevision()
@@ -130,8 +131,8 @@
if (historicalFileId == null) return;
selectedHistoricalFile = wikiNodeDAO.findHistoricalFile(getCurrentFile().getHistoricalEntityName(), historicalFileId);
if (selectedHistoricalFile == null) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ statusMessages.addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.HistoricalNodeNotFound",
"Couldn't find historical node: {0}",
historicalFileId
@@ -192,8 +193,8 @@
diffResult = result.toString();
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.DiffCreated",
"Comparing current revision with historical revision {0}",
selectedHistoricalFile.getRevision()
@@ -202,8 +203,8 @@
@Restrict("#{s:hasPermission('Node', 'edit', documentHistory.currentFile)}")
public String rollback() {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.RollingBackDocument",
"Rolling document back to revision {0}",
selectedHistoricalFile.getRevision()
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-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -9,6 +9,7 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -28,7 +29,8 @@
import org.jboss.seam.wiki.preferences.Preferences;
import org.hibernate.validator.Length;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.*;
@Name("documentHome")
@@ -259,8 +261,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Document.Persist",
"Document '{0}' has been saved.",
getInstance().getName()
@@ -269,8 +271,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Document.Update",
"Document '{0}' has been updated.",
getInstance().getName()
@@ -279,8 +281,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Document.Delete",
"Document '{0}' has been deleted.",
getInstance().getName()
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-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -21,9 +21,11 @@
import org.jboss.seam.wiki.core.exception.InvalidWikiRequestException;
import org.jboss.seam.wiki.util.WikiUtil;
import org.jboss.seam.wiki.preferences.Preferences;
+import org.jboss.seam.international.StatusMessages;
-import static javax.faces.application.FacesMessage.SEVERITY_WARN;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.Date;
import java.util.List;
@@ -355,9 +357,9 @@
if (getWikiNodeDAO().isUniqueWikiname(getParentNode().getAreaNumber(), getInstance())) {
return true;
} else {
- getFacesMessages().addToControlFromResourceBundleOrDefault(
+ StatusMessages.instance().addToControlFromResourceBundleOrDefault(
"name",
- SEVERITY_WARN,
+ WARN,
"lacewiki.entity.DuplicateName",
"This name is already used, please change it"
);
@@ -385,8 +387,8 @@
}
protected void trashedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Node.Trashed",
"'{0}' has been moved into the trash.",
getInstance().getName()
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PluginPreferenceEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PluginPreferenceEditor.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PluginPreferenceEditor.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -17,7 +17,6 @@
import org.jboss.seam.annotations.AutoCreate;
import org.hibernate.validator.InvalidValue;
-import javax.faces.application.FacesMessage;
import java.util.*;
import java.io.Serializable;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PreferenceEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PreferenceEditor.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/PreferenceEditor.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -2,8 +2,8 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.wiki.core.model.User;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
import org.jboss.seam.wiki.preferences.PreferenceValue;
@@ -12,7 +12,8 @@
import org.jboss.seam.wiki.preferences.metamodel.PreferenceRegistry;
import org.hibernate.validator.InvalidValue;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+
import java.util.*;
import java.io.Serializable;
@@ -23,7 +24,7 @@
@Logger static Log log;
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@In
PreferenceProvider preferenceProvider;
@@ -63,9 +64,9 @@
for (InvalidValue validationError : entry.getValue()) {
valid = false;
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"preferenceValidationErrors",
- FacesMessage.SEVERITY_WARN,
+ WARN,
"preferenceValueValidationFailed." + preferenceEntity.getEntityName() + "." + entry.getKey().getFieldName(),
preferenceEntity.getDescription() + " - '" + entry.getKey().getDescription() + "': " + validationError.getMessage());
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/TagEditor.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -7,16 +7,16 @@
package org.jboss.seam.wiki.core.action;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.wiki.core.dao.TagDAO;
import org.jboss.seam.wiki.core.model.DisplayTagCount;
import org.jboss.seam.wiki.core.model.WikiDirectory;
-import javax.faces.application.FacesMessage;
import java.util.*;
import java.io.Serializable;
@@ -34,9 +34,6 @@
@In
private WikiDirectory wikiRoot;
- @In
- private FacesMessages facesMessages;
-
private SortedSet<String> tags = new TreeSet<String>();
private String newTag;
private List<DisplayTagCount> popularTags;
@@ -71,9 +68,9 @@
public void addNewTag() {
if (!newTag.matches("[\\w\\s]+")) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ StatusMessages.instance().addToControlFromResourceBundleOrDefault(
"newTag",
- FacesMessage.SEVERITY_WARN,
+ StatusMessage.Severity.WARN,
"lacewiki.msg.tagEdit.TagCantContainSpecialCharacters",
"Tag can only contain alphanumeric characters."
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UploadHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -3,6 +3,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.Component;
import org.jboss.seam.international.Messages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
@@ -13,7 +14,8 @@
import org.jboss.seam.wiki.core.upload.Uploader;
import org.jboss.seam.wiki.core.upload.editor.UploadEditor;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.Date;
import java.util.Map;
@@ -134,8 +136,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Upload.Persist",
"File '{0}' has been saved.",
getInstance().getName()
@@ -144,8 +146,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Upload.Update",
"File '{0}' has been updated.",
getInstance().getName()
@@ -154,8 +156,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.Upload.Delete",
"File '{0}' has been deleted.",
getInstance().getName()
@@ -163,8 +165,8 @@
}
protected void uploadUpdatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.uploadEdit.UpdateUpload",
"File '{0}' has been uploaded.",
uploader.getFilename()
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -15,9 +15,9 @@
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.framework.EntityHome;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.security.AuthorizationException;
import org.jboss.seam.security.Identity;
import org.jboss.seam.wiki.core.action.prefs.UserManagementPreferences;
@@ -34,8 +34,10 @@
import org.jboss.seam.wiki.util.Hash;
import org.jboss.seam.wiki.util.WikiUtil;
-import javax.faces.application.FacesMessage;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
@@ -46,7 +48,7 @@
public class UserHome extends EntityHome<User> {
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@In
private UserDAO userDAO;
@@ -181,14 +183,14 @@
+ "/mailtemplates/confirmationRegistration.xhtml");
/* For debugging
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
getMessageKeyPrefix() + "confirmationEmailSent",
"Activiate account: /confirmRegistration.seam?activationCode=" + getInstance().getActivationCode());
*/
} catch (Exception ex) {
- facesMessages.add(FacesMessage.SEVERITY_ERROR, "Couldn't send confirmation email: " + ex.getMessage());
+ statusMessages.add(ERROR, "Couldn't send confirmation email: " + ex.getMessage());
return "error";
}
@@ -213,8 +215,8 @@
);
} else {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.userHome.WrongPortraitImageType",
"The file type '{0}' is not supported, the portrait was not updated.",
uploader.getUpload().getContentType()
@@ -321,8 +323,8 @@
getInstance().getProfile().setImage(null);
getInstance().getProfile().setImageContentType(null);
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.userHome.PortraitRemoved",
"The portrait has been removed, save to make changes permanent."
);
@@ -333,8 +335,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.User.Persist",
"User account '{0}' has been saved.",
getInstance().getUsername()
@@ -343,8 +345,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.User.Update",
"User account '{0}' has been updated.",
getInstance().getUsername()
@@ -353,8 +355,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.User.Delete",
"User account '{0}' has been deleted.",
getInstance().getUsername()
@@ -377,8 +379,8 @@
Authenticator auth = (Authenticator)Component.getInstance(Authenticator.class);
auth.createHomeDirectory(getInstance());
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.HomeDirectoryCreated",
"New home directory has been queued, save settings to commit."
);
@@ -389,9 +391,9 @@
public boolean passwordAndControlNotNull() {
if (getPassword() == null || getPassword().length() == 0 ||
getPasswordControl() == null || getPasswordControl().length() == 0) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"passwordControl",
- FacesMessage.SEVERITY_WARN,
+ WARN,
"lacewiki.msg.PasswordOrPasswordControlEmpty",
"Please enter your password twice!"
);
@@ -403,9 +405,9 @@
public boolean passwordMatchesRegex() {
Matcher matcher = Pattern.compile(prefs.getPasswordRegex()).matcher(getPassword());
if (!matcher.find()) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"password",
- FacesMessage.SEVERITY_WARN,
+ WARN,
"lacewiki.msg.PasswordDoesntMatchPattern",
"Password does not match the pattern: {0}",
prefs.getPasswordRegex()
@@ -417,9 +419,9 @@
public boolean passwordMatchesControl() {
if (password == null || passwordControl == null || !password.equals(passwordControl) ) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"passwordControl",
- FacesMessage.SEVERITY_WARN,
+ WARN,
"lacewiki.msg.PasswordControlNoMatch",
"The passwords don't match."
);
@@ -431,9 +433,9 @@
public boolean isUniqueUsername() {
User foundUser = userDAO.findUser(getInstance().getUsername(), false, false);
if ( foundUser != null && foundUser != getInstance() ) {
- facesMessages.addToControlFromResourceBundleOrDefault(
+ statusMessages.addToControlFromResourceBundleOrDefault(
"username",
- FacesMessage.SEVERITY_WARN,
+ WARN,
"lacewiki.msg.UsernameExists",
"A user with that name already exists."
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserPasswordReset.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -8,12 +8,12 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.faces.Renderer;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.core.action.prefs.UserManagementPreferences;
@@ -23,7 +23,10 @@
import org.jboss.seam.wiki.preferences.Preferences;
import org.jboss.seam.wiki.util.Hash;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import javax.persistence.EntityManager;
import java.io.Serializable;
import java.util.regex.Matcher;
@@ -60,7 +63,7 @@
Log log;
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@In("#{preferences.get('UserManagement')}")
UserManagementPreferences prefs;
@@ -102,8 +105,8 @@
User user = getUserForEmail(username, email);
if (user == null) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.resetPassword.NotValid",
"Your account and e-mail address information didn't match, please try again to reset your password."
);
@@ -127,14 +130,14 @@
+ Preferences.instance().get(WikiPreferences.class).getThemeName()
+ "/mailtemplates/resetPassword.xhtml");
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.resetPassword.EmailSent",
"A new activation code has been sent to your e-mail address, please read this e-mail to reset your password."
);
} catch (Exception ex) {
- facesMessages.add(FacesMessage.SEVERITY_WARN, "Couldn't send password reset email: " + ex.getMessage());
+ statusMessages.add(WARN, "Couldn't send password reset email: " + ex.getMessage());
}
}
@@ -179,8 +182,8 @@
Contexts.getSessionContext().remove(RESET_PASSWORD_OF_USER);
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.resetPassword.Complete",
"Successfully reset password of account '{0}', please log in.",
persistentUser.getUsername()
@@ -197,8 +200,8 @@
public boolean passwordAndControlNotNull() {
if (getPassword() == null || getPassword().length() == 0 ||
getPasswordControl() == null || getPasswordControl().length() == 0) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.PasswordOrPasswordControlEmpty",
"Please enter your password twice!"
);
@@ -210,8 +213,8 @@
public boolean passwordMatchesRegex() {
Matcher matcher = Pattern.compile(prefs.getPasswordRegex()).matcher(getPassword());
if (!matcher.find()) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.PasswordDoesntMatchPattern",
"Password does not match the pattern: {0}",
prefs.getPasswordRegex()
@@ -223,8 +226,8 @@
public boolean passwordMatchesControl() {
if (!password.equals(passwordControl) ) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.PasswordControlNoMatch",
"The passwords don't match."
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserSearch.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserSearch.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/UserSearch.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -3,11 +3,12 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.wiki.core.dao.UserDAO;
import org.jboss.seam.wiki.core.model.User;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.List;
import java.io.Serializable;
@@ -19,8 +20,8 @@
private UserDAO userDAO;
@In
- private FacesMessages facesMessages;
-
+ private StatusMessages statusMessages;
+
private User exampleUser;
private String orderByProperty;
private boolean orderDescending;
@@ -73,8 +74,8 @@
private void queryRowCount() {
rowCount = userDAO.getRowCountByExample(exampleUser, ignoreProperties);
if (rowCount == 0) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ statusMessages.addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.NoUserFound",
"No user with given attributes was found, please try again."
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/WikiRequestResolver.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -10,7 +10,6 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.*;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.web.Parameters;
import org.jboss.seam.wiki.core.dao.WikiNodeDAO;
@@ -18,7 +17,8 @@
import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.search.WikiSearch;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+import org.jboss.seam.international.StatusMessages;
/**
* Returns <tt>docDisplay</tt>, <tt>dirDisplay</tt>, or <tt>search</tt> for the resolved <tt>nodeId</tt>.
@@ -73,9 +73,6 @@
static Log log;
@In
- private FacesMessages facesMessages;
-
- @In
protected WikiNodeDAO wikiNodeDAO;
protected Long nodeId;
@@ -107,8 +104,8 @@
// Queue a message if requested (for message passing across session invalidations and conversations)
if (message != null) {
log.debug("wiki request contained message: " + message);
- facesMessages.addFromResourceBundle(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundle(
+ INFO,
message
);
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/cache/PageFragmentCache.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -87,20 +87,20 @@
}
}
- public void put(String region, Serializable key, String content) {
+ public void put(String region, String key, String content) {
if (!caches.containsKey(region))
throw new IllegalStateException("can't put into uninitialized cache region: " + region);
caches.get(region).put(new Element(key, content));
}
- public String get(String region, Serializable key) {
+ public String get(String region, String key) {
if (!caches.containsKey(region))
throw new IllegalStateException("can't get from uninitialized cache region: " + region);
Element result = caches.get(region).get(key);
return result != null ? (String)result.getValue() : null;
}
- public void remove(String region, Serializable key) {
+ public void remove(String region, String key) {
if (!caches.containsKey(region))
throw new IllegalStateException("can't remove from uninitialized cache region: " + region);
caches.get(region).remove(key);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptcha.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptcha.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptcha.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,26 +1,33 @@
package org.jboss.seam.wiki.core.captcha;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.captcha.Captcha;
-import org.jboss.seam.captcha.CaptchaResponse;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.log.Logging;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
+import java.io.Serializable;
/**
* Some code borrowed here: http://www.jroller.com/mlconnor/entry/simple_captcha_jsp
+ *
+ * @author Christian Bauer
*/
@Name("org.jboss.seam.captcha.captcha")
@Scope(ScopeType.SESSION)
@Install(precedence = Install.APPLICATION)
-public class WikiCaptcha extends Captcha {
+@BypassInterceptors
+public class WikiCaptcha extends Captcha implements Serializable {
- Color backgroundColor = new Color(0xf5,0xf5, 0xf5);
+ Log log = Logging.getLog(WikiCaptcha.class);
+
+ Color backgroundColor = new Color(0xf5, 0xf5, 0xf5);
Font textFont = new Font("Arial", Font.PLAIN, 25);
int charsToPrint = 6;
int width = 120;
@@ -28,24 +35,21 @@
int circlesToDraw = 4;
float horizMargin = 20.0f;
double rotationRange = 0.2;
- String elegibleChars = "ABDEFGHJKLMRSTUVWXYabdefhjkmnrstuvwxy23456789";
+ String elegibleChars = "ABDEFGHJKLMRSTUVWXYabdefhkmnrstuvwx245679";
char[] chars = elegibleChars.toCharArray();
@Override
- @Create
public void init() {
- super.init();
-
- StringBuffer finalString = new StringBuffer();
+ StringBuffer challengeString = new StringBuffer();
for (int i = 0; i < charsToPrint; i++) {
double randomValue = Math.random();
int randomIndex = (int) Math.round(randomValue * (chars.length - 1));
char characterToShow = chars[randomIndex];
- finalString.append(characterToShow);
+ challengeString.append(characterToShow);
}
- setChallenge(finalString.toString());
- setCorrectResponse(finalString.toString());
+ setChallenge(challengeString.toString());
+ log.debug("setting captcha challenge: " + getChallenge());
}
@Override
@@ -59,8 +63,8 @@
// Some obfuscation circles
for (int i = 0; i < circlesToDraw; i++) {
- int circleColor = 80 + (int)(Math.random() * 70);
- float circleLinewidth = 0.3f + (float)(Math.random());
+ int circleColor = 80 + (int) (Math.random() * 70);
+ float circleLinewidth = 0.3f + (float) (Math.random());
g.setColor(new Color(circleColor, circleColor, circleColor));
g.setStroke(new BasicStroke(circleLinewidth));
int circleRadius = (int) (Math.random() * height / 2.0);
@@ -78,7 +82,7 @@
float spacePerChar = spaceForLetters / (charsToPrint - 1.0f);
char[] allChars = getChallenge().toCharArray();
- for (int i = 0; i < allChars.length; i++ ) {
+ for (int i = 0; i < allChars.length; i++) {
char charToPrint = allChars[i];
int charWidth = fontMetrics.charWidth(charToPrint);
int charDim = Math.max(maxAdvance, fontHeight);
@@ -89,11 +93,11 @@
double angle = (Math.random() - 0.5) * rotationRange;
charGraphics.transform(AffineTransform.getRotateInstance(angle));
charGraphics.translate(-halfCharDim, -halfCharDim);
- int charColor = 60 + (int)(Math.random() * 90);
+ int charColor = 60 + (int) (Math.random() * 90);
charGraphics.setColor(new Color(charColor, charColor, charColor));
charGraphics.setFont(textFont);
int charX = (int) (0.5 * charDim - 0.5 * charWidth);
- charGraphics.drawString("" + charToPrint, charX, ((charDim - fontMetrics.getAscent())/2 + fontMetrics.getAscent()));
+ charGraphics.drawString("" + charToPrint, charX, ((charDim - fontMetrics.getAscent()) / 2 + fontMetrics.getAscent()));
float x = horizMargin + spacePerChar * (i) - charDim / 2.0f;
int y = ((height - charDim) / 2);
g.drawImage(charImage, (int) x, y, charDim, charDim, null, null);
@@ -106,8 +110,13 @@
}
@Override
- @CaptchaResponse(message = "#{messages['lacewiki.label.VerificationError']}")
+ // Remove this: @CaptchaResponse so we can use our own validator, even if someone by accident uses s:validate/All
public String getResponse() {
return super.getResponse();
}
+
+ public String getProtectedChallenge() {
+ return getChallenge();
+ }
+
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptchaValidator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptchaValidator.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/captcha/WikiCaptchaValidator.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.captcha;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.faces.Validator;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.Interpolator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.validator.ValidatorException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * I don't trust the built-in validator with @CaptchaResponse.
+ *
+ * First, it seems to call captcha.validateResponse() twice on a form submit.
+ * Second, sometimes my message vanishes and I get the default message ("incorrect response").
+ * I can't reproduce that, so I've given up.
+ *
+ * @author Christian Bauer
+ */
+@Name("wikiCaptchaValidator")
+@Validator(id = "wikiCaptchaValidator")
+public class WikiCaptchaValidator implements javax.faces.validator.Validator {
+
+ public static final String VERIFICATION_MSG_EXPR = "#{messages['lacewiki.label.VerificationError']}";
+
+ Log log = Logging.getLog(WikiCaptchaValidator.class);
+
+ public void validate(FacesContext facesContext, UIComponent uiComponent, Object o) throws ValidatorException {
+ WikiCaptcha captcha = (WikiCaptcha)WikiCaptcha.instance();
+
+ String response = (String)o;
+ String challenge = captcha.getProtectedChallenge();
+
+ log.debug("verifying captcha response: " + response + " against challenge: " + challenge);
+ boolean valid = response != null && challenge != null && response.trim().equals(challenge);
+ if (!valid) {
+ log.debug("response is not valid, initializing with new challenge");
+ captcha.init();
+ FacesMessage msg = new FacesMessage();
+ msg.setSummary(Interpolator.instance().interpolate(VERIFICATION_MSG_EXPR));
+ msg.setSeverity(FacesMessage.SEVERITY_WARN);
+ throw new ValidatorException(msg);
+ }
+ log.debug("response is valid");
+ }
+}
+
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/dao/WikiNodeFactory.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -8,9 +8,9 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.annotations.*;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.core.model.LinkProtocol;
import org.jboss.seam.wiki.core.model.WikiDirectory;
@@ -18,7 +18,8 @@
import org.jboss.seam.wiki.util.WikiUtil;
import org.jboss.seam.wiki.preferences.Preferences;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+
import javax.persistence.EntityManager;
import javax.persistence.EntityNotFoundException;
import javax.persistence.NoResultException;
@@ -121,8 +122,8 @@
.setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.MemberHomedirectoryNotFound",
"Could not find member area with name {0} - your configuration is broken, please change it.",
memberAreaName
@@ -144,8 +145,8 @@
.setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.TrashAreaNotFound",
"Could not find trash area with name {0} - your configuration is broken, please change it.",
trashAreaName
@@ -167,8 +168,8 @@
.setHint("org.hibernate.cacheable", false)
.getSingleResult();
} catch (RuntimeException ex) {
- FacesMessages.instance().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.HelpAreaNotFound",
"Could not find help area with name {0} - your configuration is broken, please change it.",
helpAreaName
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -77,7 +77,7 @@
public WikiPluginMacro createWikiPluginMacro(WikiTextMacro wikiTextMacro) {
if (getMacroPluginModulesByMacroName().containsKey(wikiTextMacro.getName())) {
- log.debug("binding WikiTextMacro metadata to create WikiPluginMacro instance");
+ log.debug("binding WikiTextMacro metadata to create WikiPluginMacro instance: " + wikiTextMacro);
return new WikiPluginMacro( getMacroPluginModulesByMacroName().get(wikiTextMacro.getName()), wikiTextMacro );
} else {
return null;
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/WikiPluginMacro.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -178,7 +178,7 @@
// JSF "oh let's map a non-existant request parameter to an empty string" genius behavior...
if (objects != null && objects.length > 0) {
for (Object o : objects) {
- if (Math.abs(o.hashCode()) != 0) {
+ if (o != null && Math.abs(o.hashCode()) != 0) {
log.debug("including hashCode of object: " + Math.abs(o.hashCode()));
builder.append( Math.abs(o.hashCode()) );
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/search/WikiSearch.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -70,6 +70,8 @@
@Create
public void create() {
+ // TODO: Minor optimization, do this lazily when search.xhtml is rendered, not when the component is created (on every wiki page render)
+
// Initialize the value holders used for UI binding
for (SearchableEntity searchableEntity : searchRegistry.getSearchableEntities()) {
log.debug("preparing search value holder for entity: " + searchableEntity.getDescription());
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/MacroComponentHandler.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,11 +1,11 @@
package org.jboss.seam.wiki.core.ui;
-import javax.faces.component.UIComponent;
-
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.jsf.ComponentConfig;
import com.sun.facelets.tag.jsf.ComponentHandler;
+import javax.faces.component.UIComponent;
+
/**
* Chaining up the macros. Still a bit of a riddle, what Pete did here.
*
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/UIWikiFormattedText.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -85,6 +85,7 @@
@Override
public void encodeBegin(FacesContext facesContext) throws IOException {
if (!isRendered() || getValue() == null) return;
+ log.debug(">>> ENCODE BEGIN of WikiFormattedText component");
// Use the WikiTextParser to resolve macros
WikiTextParser parser = new WikiTextParser((String) getValue(), true, true);
@@ -266,7 +267,7 @@
parser.setRenderer(new WikiFormattedTextRenderer());
try {
- log.debug(">>> rendering wiki text");
+ log.debug("parsing wiki text for HTML encoding");
parser.parse();
} catch (RecognitionException rex) {
@@ -279,6 +280,7 @@
facesContext.getResponseWriter().write(parser.toString());
+ log.debug("<<< ENCODE END of WikiFormattedText component");
}
protected void addMacroWithTemplate(WikiPluginMacro pluginMacro) {
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiFormattedTextHandler.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -170,7 +170,7 @@
// Check if the wikiTextMacro actually is registered, we don't build unknown macros
WikiPluginMacro pluginMacro = PluginRegistry.instance().createWikiPluginMacro(wikiTextMacro);
if (pluginMacro == null) {
- log.warn("macro is not bound in plugin registry: " + wikiTextMacro);
+ log.info("macro is not bound in plugin registry: " + wikiTextMacro);
getPageMacroStack().pop();
return null;
}
Added: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheInvalidator.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheInvalidator.java (rev 0)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheInvalidator.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.core.ui;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.wiki.core.model.User;
+import org.jboss.seam.wiki.core.cache.PageFragmentCache;
+
+import java.util.List;
+
+/**
+ * Invalidates various page fragment caches, listening to core events.
+ *
+ * @author Christian Bauer
+ */
+@Name("wikiPageFragmentCacheInvalidator")
+public class WikiPageFragmentCacheInvalidator {
+
+ public static final String CACHE_REGION_COMMENT = "wiki.Comment";
+ public static final String CACHE_REGION_SIGNATURE = "wiki.Signature";
+
+ @In
+ PageFragmentCache pageFragmentCache;
+
+ @Observer("User.updated")
+ public void invalidateUserSignature(User user) {
+ pageFragmentCache.remove(CACHE_REGION_SIGNATURE, user.getId().toString());
+ }
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiPageFragmentCacheRenderer.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -40,7 +40,6 @@
@Override
protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
UICache cache = (UICache) component;
- log.debug("ui cache is enabled: " + cache.isEnabled());
if (cache.isEnabled()) {
String region = cache.getRegion();
if (region == null) {
@@ -71,6 +70,7 @@
log.debug("cached rendering is disabled for: " + cache.getKey());
renderChildren(context, component);
}
+ log.debug("rendering (including all children) complete");
}
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiTextEditor.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -4,14 +4,15 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.log.Log;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.ui.validator.FormattedTextValidator;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+
import java.io.Serializable;
import javax.faces.validator.ValidatorException;
-import javax.faces.application.FacesMessage;
/**
* Utility class bound to Wiki text editor UI.
@@ -35,9 +36,9 @@
} catch (ValidatorException e) {
log.debug("exception during validation: " + e.getFacesMessage().getSummary());
// TODO: Needs to use resource bundle, how?
- FacesMessages.instance().addToControl(
+ StatusMessages.instance().addToControl(
textEditorId + "TextArea",
- FacesMessage.SEVERITY_WARN,
+ WARN,
e.getFacesMessage().getSummary()
);
}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/Uploader.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/Uploader.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/Uploader.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -2,16 +2,18 @@
import net.sf.jmimemagic.Magic;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.log.Log;
import org.jboss.seam.wiki.core.model.WikiUpload;
import org.jboss.seam.wiki.core.upload.handler.UploadHandler;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+
import java.util.Map;
import java.io.Serializable;
@@ -35,7 +37,7 @@
Log log;
@In
- private FacesMessages facesMessages;
+ private StatusMessages statusMessages;
@In
Map<String, UploadType> uploadTypes;
@@ -156,8 +158,8 @@
? previousUploadType.getUploadHandler()
: uploadTypes.get(UploadTypes.GENERIC_UPLOAD_TYPE).getUploadHandler();
if (!previousUploadHandler.getClass().equals(newupUploadHandler.getClass())) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ statusMessages.addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.upload.HandlersDontMatch",
"Wrong file type uploaded, please try again with a different file."
);
@@ -179,8 +181,8 @@
public boolean validateData() {
if (data == null || data.length == 0) {
- facesMessages.addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_WARN,
+ statusMessages.addFromResourceBundleOrDefault(
+ WARN,
"lacewiki.msg.upload.NoData",
"Please select a file to upload"
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/ZipImporter.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/ZipImporter.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/ZipImporter.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -15,7 +15,9 @@
import org.hibernate.validator.InvalidValue;
import org.hibernate.validator.ClassValidator;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import javax.persistence.EntityManager;
import java.util.*;
import java.util.zip.ZipEntry;
@@ -113,8 +115,8 @@
protected boolean handleDirectory(EntityManager em, WikiUpload zipFile, ZipEntry zipEntry) {
log.debug("skipping directory: " + zipEntry.getName());
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ getStatusMessages().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.ImportSkippingDirectory",
"Skipping directory '{0}', importing not supported...",
zipEntry.getName()
@@ -134,8 +136,8 @@
return true;
} else {
log.debug("new name is not unique and invalid");
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ getStatusMessages().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.ImportDuplicateName",
"Skipping file '{0}', name is already used in this area...",
newWikiname
@@ -209,8 +211,8 @@
if (invalidValues != null && invalidValues.length > 0) {
log.debug("new node is invalid: " + newNode);
for (InvalidValue invalidValue : invalidValues) {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ getStatusMessages().addFromResourceBundleOrDefault(
+ ERROR,
"lacewiki.msg.ImportInvalidNode",
"Skipping entry '{0}', invalid: {1}",
newNode.getName(),
@@ -224,8 +226,8 @@
log.debug("persisting newly imported node: " + newNode);
newNode.setParent(zipFile.getParent());
em.persist(newNode);
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ getStatusMessages().addFromResourceBundleOrDefault(
+ INFO,
"lacewiki.msg.ImportOk",
"Created file '{0}' in current directory.",
newNode.getName()
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/blosxom/BlosxomImporter.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/blosxom/BlosxomImporter.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/blosxom/BlosxomImporter.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -10,7 +10,8 @@
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.util.WikiUtil;
-import javax.faces.application.FacesMessage;
+import static org.jboss.seam.international.StatusMessage.Severity.ERROR;
+
import javax.persistence.EntityManager;
import java.util.Comparator;
import java.util.Date;
@@ -48,8 +49,8 @@
log.debug("mime type of zip entry is: " + mimeType);
} catch (Exception ex) {}
if (!"text/plain".equals(mimeType)) {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ statusMessages.addFromResourceBundleOrDefault(
+ ERROR,
"incorrectMimeType",
"Skipping file '" + zipEntry.getName() + "', incorrect mime type " + mimeType + " , expected text/plain"
);
@@ -151,8 +152,8 @@
InvalidValue[] invalidValues = commentValidator.getInvalidValues(newComment);
if (invalidValues.length >0) {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_ERROR,
+ getStatusMessages().addFromResourceBundleOrDefault(
+ ERROR,
"commentFailedValidation",
"Skipping file '" + zipEntry.getName() + "', comment failed validation"
);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/AbstractImporter.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/AbstractImporter.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/upload/importers/metamodel/AbstractImporter.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -3,7 +3,7 @@
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.FacesMessages;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.wiki.core.model.WikiUpload;
import javax.persistence.EntityManager;
@@ -17,8 +17,8 @@
importerComponents.add(this);
}
- protected FacesMessages getFacesMessages() {
- return FacesMessages.instance();
+ protected StatusMessages getStatusMessages() {
+ return StatusMessages.instance();
}
public abstract boolean handleImport(EntityManager em, WikiUpload file);
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -25,6 +25,14 @@
<applicable-to content="true" header="true" footer="true"/>
</macro>
+ <macro key="hideBreadcrumb" name="hideBreadcrumb">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <applicable-to content="true" header="true" footer="true"/>
+ </macro>
+
<macro key="hideComments" name="hideComments">
<skins>
<skin name="d"/>
@@ -142,12 +150,15 @@
<skin name="d"/>
<skin name="m"/>
</skins>
+
+ <!-- TODO: Re-enable after we switched from s:graphicImage to prerendered user portraits
<cache-regions>
<cache-region name="UserProfile">
<invalidation-event name="User.updated"/>
<invalidation-event name="User.removed"/>
</cache-region>
</cache-regions>
+ -->
</macro>
</plugin>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-05-21 07:38:53 UTC (rev 8242)
@@ -7,6 +7,9 @@
basic.hideControls.label=Hide Controls
basic.hideControls.description=Do not display page controls
+basic.hideBreadcrumb.label=Hide Breadcrumb
+basic.hideBreadcrumb.description=Do not display page breadcrumb
+
basic.hideComments.label=Hide Comments
basic.hideComments.description=Do not display comments of document (even if comments are enabled)
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/userProfile.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -7,11 +7,12 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:s="http://jboss.com/products/seam/taglib">
+ <!-- TODO: see Basic.plugin.xml
<s:cache region="#{currentMacro.getCacheRegion('UserProfile')}"
key="#{currentMacro.getCacheKey(currentDocument.createdBy.id)}">
+ -->
<ui:include src="/includes/userInfo.xhtml">
<ui:param name="user" value="#{currentDocument.createdBy}"/>
</ui:include>
- </s:cache>
</wiki:plugin>
\ No newline at end of file
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/Blog.plugin.xml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -51,5 +51,13 @@
</cache-regions>
</macro>
+ <macro key="entry" name="blogEntry">
+ <applicable-to header="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ </macro>
+
</plugin>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/i18n/messages_blog_en.properties 2008-05-21 07:38:53 UTC (rev 8242)
@@ -35,3 +35,5 @@
blog.recentEntries.preferences.property.recentEntriesTruncateTitle=Truncate recent entries title after characters
blog.recentEntries.preferences.property.recentEntriesSubscribeIcon=Show feed subscribe icon on recent entries
+blog.entry.label=Blog Entry
+blog.entry.description=Turns a WikiDocument into a blog entry
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/FaqQuestionHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -4,11 +4,13 @@
import org.jboss.seam.annotations.*;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.wiki.core.action.DocumentHome;
import org.jboss.seam.wiki.core.model.WikiDocument;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
@Name("faqQuestionHome")
@Scope(ScopeType.CONVERSATION)
public class FaqQuestionHome extends DocumentHome {
@@ -67,8 +69,8 @@
/* -------------------------- Messages ------------------------------ */
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"fb.faqBrowser.msg.Question.Persist",
"Question '{0}' has been saved.",
getInstance().getName()
@@ -76,8 +78,8 @@
}
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"fb.faqBrowser.msg.Question.Update",
"Question '{0}' has been updated.",
getInstance().getName()
@@ -85,8 +87,8 @@
}
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"fb.faqBrowser.msg.Question.Delete",
"Question '{0}' has been deleted.",
getInstance().getName()
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/Forum.plugin.xml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -68,6 +68,17 @@
</render-options>
</macro>
+ <macro key="notifyReplies" name="forumNotifyReplies">
+ <applicable-to header="true"/>
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ <render-options>
+ <singleton/>
+ </render-options>
+ </macro>
+
<macro key="replies" name="forumReplies">
<applicable-to footer="true"/>
<skins>
@@ -85,14 +96,6 @@
<skin name="d"/>
<skin name="m"/>
</skins>
- <cache-regions>
- <cache-region name="TopPostersList">
- <invalidation-event name="Node.removed"/>
- <invalidation-event name="User.removed"/>
- <invalidation-event name="User.updated"/>
- <invalidation-event name="Comment.rated"/>
- </cache-region>
- </cache-regions>
</macro>
</plugin>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumDAO.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumDAO.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -32,6 +32,15 @@
.list();
}
+ public boolean findForumsAvailability(WikiDirectory forumsDirectory) {
+ Long forumsCount = (Long)
+ getSession(true).getNamedQuery("forumsCount")
+ .setParameter("parentDir", forumsDirectory)
+ .setComment("Finding all forums")
+ .uniqueResult();
+ return forumsCount > 0l;
+ }
+
public Map<Long, ForumInfo> findForums(WikiDirectory forumsDirectory) {
final Map<Long, ForumInfo> forumInfoMap = new LinkedHashMap<Long, ForumInfo>();
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumHome.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,14 +1,15 @@
package org.jboss.seam.wiki.plugin.forum;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.annotations.*;
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
import org.jboss.seam.wiki.core.model.*;
import org.jboss.seam.wiki.core.action.DirectoryHome;
-import javax.faces.application.FacesMessage;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import java.util.List;
@Name("forumHome")
@@ -101,8 +102,8 @@
@Override
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Forum.Persist",
"Forum '{0}' has been saved.",
getInstance().getName()
@@ -111,8 +112,8 @@
@Override
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Forum.Update",
"Forum '{0}' has been updated.",
getInstance().getName()
@@ -121,8 +122,8 @@
@Override
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Forum.Delete",
"Forum '{0}' has been deleted.",
getInstance().getName()
@@ -131,16 +132,16 @@
@Override
protected void feedCreatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Feed.Create",
"Created syndication feed for this forum");
}
@Override
protected void feedRemovedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- FacesMessage.SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Feed.Remove",
"Removed syndication feed of this forum");
}
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQueries.hbm.xml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -5,6 +5,17 @@
<hibernate-mapping>
+ <query name="forumsCount">
+ select count(d.id)
+ from
+ WikiDirectory d fetch all properties,
+ WikiMenuItem m
+ where
+ d = m.directory
+ and d.parent = :parentDir
+ order by m.displayPosition asc
+ </query>
+
<query name="forums">
select d.id, d
from
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ForumQuery.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -57,6 +57,20 @@
/* ####################### FORUMS ########################## */
+ Boolean forumsAvailable;
+ public boolean isForumsAvailable() {
+ if (forumsAvailable == null) loadForumsAvailability();
+ return forumsAvailable;
+ }
+
+ @Observer(value = {"Forum.forumListRefresh", "PersistenceContext.filterReset"}, create = false)
+ public void loadForumsAvailability() {
+ // The whole point of this is so that we can use it as a cheaper query in the mess that is the rendered="true/false"
+ // attribute evaluation in JSF. It is called completely randomly, at any phase in the request, on any component in
+ // the tree. It needs to be a) as cheap as possible and b) free from dependencies.
+ forumsAvailable = forumDAO.findForumsAvailability(currentDirectory);
+ }
+
List<ForumInfo> forums;
public List<ForumInfo> getForums() {
if (forums == null) loadForums();
@@ -65,7 +79,7 @@
@Observer(value = {"Forum.forumListRefresh", "PersistenceContext.filterReset"}, create = false)
public void loadForums() {
-
+ log.debug("loading forums");
Map<Long, ForumInfo> forumInfo = forumDAO.findForums(currentDirectory);
// Find unread postings
@@ -90,23 +104,31 @@
/* ####################### TOPICS ########################## */
+ private Long numOfTopics;
private List<TopicInfo> topics;
+ public boolean isTopicsAvailable() {
+ if (numOfTopics == null) countTopics();
+ return numOfTopics > 0;
+ }
+
public List<TopicInfo> getTopics() {
- if (topics == null) loadTopics();
+ if (isTopicsAvailable() && topics == null) {
+ loadTopics();
+ } else if (!isTopicsAvailable()) {
+ topics = Collections.emptyList();
+ }
return topics;
}
- @Observer(value = {"Forum.topicListRefresh", "PersistenceContext.filterReset"}, create = false)
+ public void countTopics() {
+ log.debug("counting forum topics");
+ numOfTopics = forumDAO.findTopicCount(currentDirectory);
+ pager.setNumOfRecords(numOfTopics);
+ }
+
public void loadTopics() {
log.debug("loading forum topics");
- pager.setNumOfRecords( forumDAO.findTopicCount(currentDirectory) );
-
- if (pager.getNumOfRecords() == 0) {
- topics = Collections.emptyList();
- return;
- }
-
Map<Long, TopicInfo> topicInfo = forumDAO.findTopics(currentDirectory, pager.getNextRecord(), pager.getPageSize());
if (!currentUser.isAdmin() && !currentUser.isGuest()) {
@@ -132,9 +154,15 @@
topics.addAll(topicInfo.values());
}
+ @Observer(value = {"Forum.topicListRefresh", "PersistenceContext.filterReset"}, create = false)
+ public void refreshTopics() {
+ countTopics();
+ loadTopics();
+ }
+
/* ####################### POSTERS ########################## */
- public static final String MACRO_ATTR_TOPPOSTERS = "forumTopPostersList";
+ public static final String MACRO_ATTR_TOPPOSTERS = "forumTopPostersList";
public List<User> getTopPosters(WikiPluginMacro macro) {
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/ReplyHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -2,23 +2,26 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.*;
import org.jboss.seam.faces.Renderer;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.security.Identity;
-import org.jboss.seam.annotations.*;
import org.jboss.seam.wiki.core.action.CommentHome;
-import org.jboss.seam.wiki.core.action.prefs.WikiPreferences;
import org.jboss.seam.wiki.core.model.WikiComment;
import org.jboss.seam.wiki.core.model.WikiNode;
-import org.jboss.seam.wiki.core.model.WikiDocument;
import org.jboss.seam.wiki.core.ui.WikiRedirect;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
import org.jboss.seam.wiki.preferences.Preferences;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
@Name("replyHome")
@Scope(ScopeType.CONVERSATION)
public class ReplyHome extends CommentHome {
+ public static final String REPLY_NOTIFY_TEMPLATE = "/mailtemplates/forumNotifyReply.xhtml";
+ public static final String REPLY_NOTIFY_LIST_TEMPLATE = "/mailtemplates/forumNotifyReplyToList.xhtml";
+
@Override
public void create() {
super.create();
@@ -36,21 +39,16 @@
String notificationMailingList =
Preferences.instance().get(ForumPreferences.class).getNotificationMailingList();
if (notificationMailingList != null) {
- getLog().debug("sending reply notification e-mail to forum list");
- renderer.render("/themes/"
- + Preferences.instance().get(WikiPreferences.class).getThemeName()
- + "/mailtemplates/forumNotifyReplyToList.xhtml");
+ getLog().debug("sending reply notification e-mail to forum list: " + notificationMailingList);
+ renderer.render(PluginRegistry.instance().getPlugin("forum").getPackageThemePath()+REPLY_NOTIFY_LIST_TEMPLATE);
}
// Notify original poster
if (documentHome.getInstance().macroPresent(TopicHome.TOPIC_NOTIFY_ME_MACRO)
- && !documentHome.getInstance().getCreatedBy().getUsername().equals(
- getInstance().getCreatedBy().getUsername()
- )) {
+ && !documentHome.getInstance().getCreatedBy().getUsername().equals(getInstance().getCreatedBy().getUsername())
+ ) {
getLog().debug("sending reply notification e-mail to original poster");
- renderer.render("/themes/"
- + Preferences.instance().get(WikiPreferences.class).getThemeName()
- + "/mailtemplates/forumNotifyReply.xhtml");
+ renderer.render(PluginRegistry.instance().getPlugin("forum").getPackageThemePath()+REPLY_NOTIFY_TEMPLATE);
}
}
@@ -109,8 +107,8 @@
/* -------------------------- Messages ------------------------------ */
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Reply.Persist",
"Reply '{0}' has been saved.",
getInstance().getSubject()
@@ -118,8 +116,8 @@
}
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Reply.Update",
"Reply '{0}' has been updated.",
getInstance().getSubject()
@@ -127,8 +125,8 @@
}
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Reply.Delete",
"Reply '{0}' has been deleted.",
getInstance().getSubject()
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/TopicHome.java 2008-05-21 07:38:53 UTC (rev 8242)
@@ -6,24 +6,27 @@
import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
import org.jboss.seam.faces.Renderer;
+import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.ui.validator.FormattedTextValidator;
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.WikiTextMacro;
import org.jboss.seam.wiki.core.ui.WikiRedirect;
+import org.jboss.seam.wiki.core.plugin.PluginRegistry;
import org.jboss.seam.wiki.preferences.Preferences;
-import javax.faces.application.FacesMessage;
-import static javax.faces.application.FacesMessage.SEVERITY_INFO;
+import static org.jboss.seam.international.StatusMessage.Severity.WARN;
+import static org.jboss.seam.international.StatusMessage.Severity.INFO;
+
import javax.faces.validator.ValidatorException;
@Name("topicHome")
@Scope(ScopeType.CONVERSATION)
public class TopicHome extends DocumentHome {
- public static final String TOPIC_NOTIFY_ME_MACRO = "forumNotifyReplies";
+ public static final String TOPIC_NOTIFY_ME_MACRO = "forumNotifyReplies";
+ public static final String TOPIC_NOTIFY_LIST_TEMPLATE = "/mailtemplates/forumNotifyTopicToList.xhtml";
@In
WikiDirectory currentDirectory;
@@ -31,9 +34,6 @@
@In
WikiDocument currentDocument;
- @In(create = true)
- private Renderer renderer;
-
private boolean showForm = false;
private boolean sticky = false;
private boolean notifyReplies = false;
@@ -74,9 +74,9 @@
validator.validate(null, null, getInstance().getContent());
} catch (ValidatorException e) {
// TODO: Needs to use resource bundle, how?
- getFacesMessages().addToControl(
+ StatusMessages.instance().addToControl(
"topicTextArea",
- FacesMessage.SEVERITY_WARN,
+ WARN,
e.getFacesMessage().getSummary()
);
return false;
@@ -109,10 +109,10 @@
String notificationMailingList =
Preferences.instance().get(ForumPreferences.class).getNotificationMailingList();
if (notificationMailingList != null) {
- getLog().debug("sending topic notification e-mail to forum list");
- renderer.render("/themes/"
- + Preferences.instance().get(WikiPreferences.class).getThemeName()
- + "/mailtemplates/forumNotifyTopicToList.xhtml");
+ getLog().debug("sending topic notification e-mail to forum list: " + notificationMailingList);
+ Renderer.instance().render(
+ PluginRegistry.instance().getPlugin("forum").getPackageThemePath()+TOPIC_NOTIFY_LIST_TEMPLATE
+ );
}
endConversation();
@@ -139,8 +139,8 @@
/* -------------------------- Messages ------------------------------ */
protected void createdMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Topic.Persist",
"Topic '{0}' has been saved.",
getInstance().getName()
@@ -148,8 +148,8 @@
}
protected void updatedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Topic.Update",
"Topic '{0}' has been updated.",
getInstance().getName()
@@ -157,8 +157,8 @@
}
protected void deletedMessage() {
- getFacesMessages().addFromResourceBundleOrDefault(
- SEVERITY_INFO,
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ INFO,
"forum.msg.Topic.Delete",
"Topic '{0}' has been deleted.",
getInstance().getName()
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/i18n/messages_forum_en.properties 2008-05-21 07:38:53 UTC (rev 8242)
@@ -18,6 +18,9 @@
forum.stickyPosting.label=Forum Sticky Posting
forum.stickyPosting.description=Turns a WikiDocument into a sticky forum posting
+forum.notifyReplies.label=Forum Reply Notification
+forum.notifyReplies.description=Send an e-mail to the owner of the posting if a reply is posted
+
forum.replies.label=Forum Replies
forum.replies.description=Shows wiki comments as posting replies thread
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumListTable.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -12,9 +12,9 @@
region="#{currentMacro.getCacheRegion('ForumList')}"
key="#{currentMacro.cacheKey}">
-<div class="box">
-<h:form id="forumListTableForm" rendered="#{not empty forumQuery.forums}">
+<s:div styleClass="box" rendered="#{forumQuery.forumsAvailable}">
+<h:form id="forumListTableForm">
<h:dataTable id="forumListTable"
var="f"
value="#{forumQuery.forums}"
@@ -90,8 +90,6 @@
<ui:param name="name" value="#{f.lastTopic.name}"/>
<ui:param name="createdOn" value="#{f.lastTopic.createdOn}"/>
<ui:param name="createdBy" value="#{f.lastTopic.createdBy}"/>
- <ui:param name="popupId" value="lastTopic#{f.lastTopic.id}"/>
- <ui:param name="rightOffset" value="12%"/>
</ui:include>
</s:fragment>
<s:fragment rendered="#{empty f.lastTopic}">
@@ -107,8 +105,6 @@
<ui:param name="name" value="#{f.lastTopic.name}"/>
<ui:param name="createdOn" value="#{f.lastTopic.createdOn}"/>
<ui:param name="createdBy" value="#{f.lastTopic.createdBy}"/>
- <ui:param name="popupId" value="latestPost#{f.lastTopic.id}"/>
- <ui:param name="rightOffset" value="1%"/>
</ui:include>
</s:fragment>
<s:fragment rendered="#{not empty f.lastComment and not f.lastPostLastTopic}">
@@ -117,8 +113,6 @@
<ui:param name="name" value="#{f.lastComment.subject}"/>
<ui:param name="createdOn" value="#{f.lastComment.createdOn}"/>
<ui:param name="createdBy" value="#{f.lastComment.createdBy}"/>
- <ui:param name="popupId" value="latestPost#{f.lastComment.id}"/>
- <ui:param name="rightOffset" value="1%"/>
</ui:include>
</s:fragment>
<s:fragment rendered="#{empty f.lastComment and not f.lastPostLastTopic}">
@@ -138,9 +132,9 @@
</h:dataTable>
</h:form>
-</div>
+</s:div>
-<s:div rendered="#{empty forumQuery.forums}" styleClass="box">
+<s:div styleClass="box" rendered="#{not forumQuery.forumsAvailable}">
<h:outputText value="#{messages['forum.msg.NoForumsFound']}"/>
</s:div>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumReplies.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -16,14 +16,16 @@
<s:div styleClass="commentSignatureSeparator">
<h:outputText value=" "/>
</s:div>
- <wiki:formattedText value="#{currentDocument.createdBy.profile.signature}"
- linkStyleClass="regularLink"
- brokenLinkStyleClass="brokenLink"
- attachmentLinkStyleClass="regularLink"
- thumbnailLinkStyleClass="regularLink"
- linkBaseFile="#{currentDocument}"
- currentAreaNumber="#{currentDocument.areaNumber}"
- enableMacroRendering="false"/>
+ <s:cache region="wiki.Signature" key="#{currentDocument.createdBy.id}">
+ <wiki:formattedText value="#{currentDocument.createdBy.profile.signature}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{currentDocument}"
+ currentAreaNumber="#{currentDocument.areaNumber}"
+ enableMacroRendering="false"/>
+ </s:cache>
</s:div>
<s:div rendered="#{not empty currentDocument.tags}"
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -8,76 +8,71 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:s="http://jboss.com/products/seam/taglib">
-<s:cache key="#{currentMacro.cacheKey}"
- region="#{currentMacro.getCacheRegion('TopPostersList')}">
+<s:div styleClass="forumTopPosters box">
- <s:div styleClass="forumTopPosters box">
+ <s:div styleClass="boxHeader">
+ <h:outputText value="#{preferences.get('ForumTopPosters', currentMacro).title}"/>
+ </s:div>
- <s:div styleClass="boxHeader">
- <h:outputText value="#{preferences.get('ForumTopPosters', currentMacro).title}"/>
- </s:div>
+ <div class="boxContent">
- <div class="boxContent">
+ <h:dataTable value="#{forumQuery.getTopPosters(currentMacro)}" var="p"
+ rendered="#{not empty forumQuery.getTopPosters(currentMacro) and forumQuery.getTopPosters(currentMacro).size() > 0}"
+ styleClass="datatable forumTopPostersTable"
+ headerClass="alignCenter"
+ columnClasses="fifteenPercentColumn alignCenter indexColumn,
+ defaultColumn alignCenter nameColumn,
+ twentyPercentColumn alignCenter joinedOnColumn,
+ twentyPercentColumn alignCenter ratingPointsColumn"
+ rowClasses="rowOdd, rowEven"
+ cellpadding="0" cellspacing="0" border="0">
- <h:dataTable value="#{forumQuery.getTopPosters(currentMacro)}" var="p"
- rendered="#{not empty forumQuery.getTopPosters(currentMacro) and forumQuery.getTopPosters(currentMacro).size() > 0}"
- styleClass="datatable forumTopPostersTable"
- headerClass="alignCenter"
- columnClasses="fifteenPercentColumn alignCenter indexColumn,
- defaultColumn alignCenter nameColumn,
- twentyPercentColumn alignCenter joinedOnColumn,
- twentyPercentColumn alignCenter ratingPointsColumn"
- rowClasses="rowOdd, rowEven"
- cellpadding="0" cellspacing="0" border="0">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.Position']}"/>
+ </f:facet>
+ <h:outputText value="#{forumQuery.getTopPosters(currentMacro).indexOf(p)+1}."/>
+ </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['forum.topPosters.label.Position']}"/>
- </f:facet>
- <h:outputText value="#{forumQuery.getTopPosters(currentMacro).indexOf(p)+1}."/>
- </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.User']}"/>
+ </f:facet>
+ <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:param name="user" value="#{p}"/>
+ </ui:include>
+ </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['forum.topPosters.label.User']}"/>
- </f:facet>
- <ui:include src="/includes/userInfoLink.xhtml">
- <ui:param name="user" value="#{p}"/>
- </ui:include>
- </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.JoinedOn']}"/>
+ </f:facet>
+ <h:outputText value="#{p.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
+ </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['forum.topPosters.label.JoinedOn']}"/>
- </f:facet>
- <h:outputText value="#{p.createdOn}">
- <f:convertDateTime pattern="dd. MMM yyyy, HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- <h:outputText value=" #{preferences.get('Wiki').timeZone}"/>
- </h:column>
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{messages['forum.topPosters.label.RatingPoints']}"/>
+ </f:facet>
+ <h:outputText value="#{p.ratingPoints}"/>
+ </h:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{messages['forum.topPosters.label.RatingPoints']}"/>
- </f:facet>
- <h:outputText value="#{p.ratingPoints}"/>
- </h:column>
+ </h:dataTable>
- </h:dataTable>
+ </div>
- </div>
-
- <s:div styleClass="forumTopPostersEmpty"
- rendered="#{empty forumQuery.getTopPosters(currentMacro) or forumQuery.getTopPosters(currentMacro).size() == 0}">
- <h:outputText value="#{messages['forum.topPosterslabel.NoPostersFound']}"/>
- </s:div>
-
- <div class="boxFooter"/>
-
+ <s:div styleClass="forumTopPostersEmpty"
+ rendered="#{empty forumQuery.getTopPosters(currentMacro) or forumQuery.getTopPosters(currentMacro).size() == 0}">
+ <h:outputText value="#{messages['forum.topPosters.label.NoPostersFound']}"/>
</s:div>
-</s:cache>
+ <div class="boxFooter"/>
+</s:div>
+
</wiki:plugin>
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicPager.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -6,7 +6,7 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:s="http://jboss.com/products/seam/taglib">
- <h:panelGrid columns="5" rendered="#{not empty forumQuery.topics}"
+ <h:panelGrid columns="5"
styleClass="topicPagerTable"
columnClasses="topicPagerColumn, topicPagerColumn, topicPagerTextColumn, topicPagerColumn, topicPagerColumn, "
cellpadding="0" cellspacing="0" border="0">
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -8,19 +8,18 @@
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
xmlns:wiki="http://jboss.com/products/seam/wiki">
-<s:cache rendered="#{not topicHome.showForm}"
+<s:cache rendered="#{not topicHome.showForm and forumQuery.topicsAvailable}"
enabled="#{not identity.loggedIn}"
region="#{currentMacro.getCacheRegion('TopicList')}"
key="#{currentMacro.getCacheKey(param.page)}">
<ui:include src="topicPager.xhtml"/>
- <div class="box">
+ <s:div styleClass="box">
<h:dataTable id="topicTable"
var="t"
value="#{forumQuery.topics}"
- rendered="#{not empty forumQuery.topics}"
styleClass="datatable topLeftBottomBorder topicTable"
headerClass="regularHeader rightBorder alignCenter smallFont"
columnClasses="onePercentColumn rightBorder alignCenter smallFont, defaultColumn rightBorder alignLeft wrapWhitespace,
@@ -92,13 +91,14 @@
</h:dataTable>
- </div>
+ </s:div>
- <s:div rendered="#{empty forumQuery.topics}" styleClass="box">
+ <ui:include src="topicPager.xhtml"/>
+
+ <s:div rendered="#{not forumQuery.topicsAvailable}" styleClass="box">
No topics in this forum.
</s:div>
- <ui:include src="topicPager.xhtml"/>
</s:cache>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReply.xhtml (from rev 8229, trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReply.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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(a)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, true)}">response</a>
+ to <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> 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, true)}
+</h:outputText>
+ </f:facet>
+ </m:body>
+</m:message>
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReply.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReplyToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReplyToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -0,0 +1,52 @@
+<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} <do-not-reply(a)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, true)}">following reply</a>
+ was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">#{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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> to reply...
+ <br/>
+
+ </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>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyTopicToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyTopicToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/default/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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} <do-not-reply(a)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, true)}">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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(topicHome.instance, true)}">Click here</a> 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>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml (from rev 8229, trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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(a)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, true)}">response</a>
+ to <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> 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, true)}
+</h:outputText>
+ </f:facet>
+ </m:body>
+</m:message>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -0,0 +1,52 @@
+<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} <do-not-reply(a)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, true)}">following reply</a>
+ was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">#{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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> to reply...
+ <br/>
+
+ </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>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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} <do-not-reply(a)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, true)}">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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(topicHome.instance, true)}">Click here</a> 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>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml (from rev 8229, trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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="SeamFramework.org" />
+ <m:header name="Precedence" value="list"/>
+ <m:from name="SeamFramework.org" address="do-not-reply(a)jboss.com" />
+ <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
+ <m:subject>[SeamFramework.org 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, true)}">response</a>
+ to <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">your posting</a> on the
+ Seam community 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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> 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, true)}
+</h:outputText>
+ </f:facet>
+ </m:body>
+</m:message>
Property changes on: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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="SeamFramework.org" />
+ <m:header name="Precedence" value="list"/>
+
+ <m:header name="From" value="#{replyHome.instance.createdBy.fullname} <do-not-reply(a)jboss.com>"/>
+ <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+ <m:subject>#{replyHome.instance.subject}</m:subject>
+
+ <m:body>
+ <html>
+ <body>
+ <p>
+ The <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">following reply</a>
+ was posted on the thread <a href="#{wikiURLRenderer.renderURL(currentDocument, true)}">#{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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(replyHome.instance, true)}">Click here</a> to reply...
+ <br/>
+
+ </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>
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml (from rev 8229, trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -0,0 +1,47 @@
+<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} <do-not-reply(a)jboss.com>"/>
+ <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
+
+ <m:subject>#{topicHome.instance.name}</m:subject>
+
+ <m:body>
+ <html>
+ <body>
+ <p>
+ This <a href="#{wikiURLRenderer.renderURL(topicHome.instance, true)}">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}"
+ enableMacroRendering="false"/>
+
+ <hr/>
+ <a href="#{wikiURLRenderer.renderURL(topicHome.instance, true)}">Click here</a> to reply...
+ <br/>
+
+ </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/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/jira/templates/jiraIssueList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -25,7 +25,7 @@
cellpadding="0" cellspacing="0" border="0">
<h:column>
- <h:graphicImage value="#{imagePath}/icon.priority.#{i.priorityIcon}.gif" width="18" height="18"/>
+ <h:graphicImage value="#{currentMacro.requestImagePath}/icon.priority.#{i.priorityIcon}.gif" width="18" height="18"/>
</h:column>
<h:column>
Modified: trunk/examples/wiki/view/dirEdit_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirEdit_d.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/dirEdit_d.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -122,6 +122,7 @@
<h:panelGrid columns="1" styleClass="topLeftBottomBorder rightBorder" cellpadding="0" cellspacing="0" border="0">
+ <a:region>
<s:div styleClass="minorPadding" rendered="#{not empty directoryHome.availableMenuItems}">
<h:panelGroup>
<h:selectOneMenu value="#{directoryHome.selectedChildDirectory}" converter="#{restrictedEntityConverter}" tabindex="1">
@@ -138,7 +139,9 @@
</a:commandLink>
</h:panelGroup>
</s:div>
+ </a:region>
+ <a:region>
<h:dataTable id="menuItemTable" var="menuItem"
value="#{directoryHome.menuItems}"
styleClass="datatable"
@@ -190,6 +193,7 @@
</h:column>
</h:dataTable>
+ </a:region>
</h:panelGrid>
Modified: trunk/examples/wiki/view/includes/breadcrumb.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/breadcrumb.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/includes/breadcrumb.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -7,9 +7,11 @@
xmlns:wiki="http://jboss.com/products/seam/wiki"
xmlns:s="http://jboss.com/products/seam/taglib">
+ <!--
<s:cache enabled="#{breadcrumbFactory.cacheEnabled}"
region="#{breadcrumbFactory.cacheRegion}"
key="#{breadcrumbFactory.cacheKey}">
+ -->
<h:panelGroup styleClass="breadcrumbPanel">
@@ -45,6 +47,4 @@
</ui:repeat>
</h:panelGroup>
- </s:cache>
-
</s:div>
\ No newline at end of file
Modified: trunk/examples/wiki/view/includes/captchaEntry.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/captchaEntry.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/includes/captchaEntry.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -19,10 +19,11 @@
<div class="label">#{messages['lacewiki.label.VerificationQuestion']}:</div>
<div class="input">
- <s:validateAll>
- <h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha" value="#{captcha.response}"/>
- <h:graphicImage value="/seam/resource/captcha?nocache=#{wiki:generateRandomNumber()}" styleClass="captchaImage"/>
- </s:validateAll>
+ <h:inputText tabindex="1" size="6" maxlength="6" required="true" id="verifyCaptcha"
+ value="#{captcha.response}"
+ validator="wikiCaptchaValidator">
+ </h:inputText>
+ <h:graphicImage value="/seam/resource/captcha?nocache=#{wiki:generateRandomNumber()}" styleClass="captchaImage"/>
</div>
</s:fragment>
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -97,14 +97,16 @@
</h:panelGrid>
<s:div styleClass="commentText" rendered="#{c.useWikiText and not empty currentDocument.areaNumber}">
- <wiki:formattedText value="#{c.content}"
- linkStyleClass="regularLink"
- brokenLinkStyleClass="brokenLink"
- attachmentLinkStyleClass="regularLink"
- thumbnailLinkStyleClass="regularLink"
- linkBaseFile="#{currentDocument}"
- currentAreaNumber="#{currentDocument.areaNumber}"
- enableMacroRendering="false"/>
+ <s:cache region="wiki.Comment" key="#{c.id}">
+ <wiki:formattedText value="#{c.content}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{currentDocument}"
+ currentAreaNumber="#{currentDocument.areaNumber}"
+ enableMacroRendering="false"/>
+ </s:cache>
</s:div>
<s:div styleClass="commentText" rendered="#{not c.useWikiText and currentDocument.name != c.subject}" style="margin-top:15px;">
<h:outputText value="#{wiki:escapeHTML(c.content, true)}" escape="false"/>
@@ -118,14 +120,16 @@
<s:div styleClass="commentSignatureSeparator">
<h:outputText value=" "/>
</s:div>
- <wiki:formattedText value="#{c.createdBy.profile.signature}"
- linkStyleClass="regularLink"
- brokenLinkStyleClass="brokenLink"
- attachmentLinkStyleClass="regularLink"
- thumbnailLinkStyleClass="regularLink"
- linkBaseFile="#{currentDocument}"
- currentAreaNumber="#{currentDocument.areaNumber}"
- enableMacroRendering="false"/>
+ <s:cache region="wiki.Signature" key="#{c.createdBy.id}">
+ <wiki:formattedText value="#{c.createdBy.profile.signature}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{currentDocument}"
+ currentAreaNumber="#{currentDocument.areaNumber}"
+ enableMacroRendering="false"/>
+ </s:cache>
</s:div>
<div class="commentControls">
Deleted: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,51 +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"
- 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} <do-not-reply(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/default/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,46 +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"
- 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} <do-not-reply(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,51 +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"
- 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} <do-not-reply(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/inrelationto/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,46 +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"
- 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} <do-not-reply(a)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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReply.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -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="SeamFramework.org" />
- <m:header name="Precedence" value="list"/>
- <m:from name="SeamFramework.org" address="do-not-reply(a)jboss.com" />
- <m:to name="#{currentDocument.createdBy.fullname}">#{currentDocument.createdBy.email}</m:to>
- <m:subject>[SeamFramework.org 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
- Seam community 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}"
- enableMacroRendering="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>
Deleted: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,51 +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"
- 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} <do-not-reply(a)jboss.com>"/>
- <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
-
- <m:subject>#{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}"
- enableMacroRendering="false"/>
-
- <hr/>
- <h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
- <br/>
-
- </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>
Deleted: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 03:47:56 UTC (rev 8241)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-05-21 07:38:53 UTC (rev 8242)
@@ -1,47 +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"
- 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} <do-not-reply(a)jboss.com>"/>
- <m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
-
- <m:subject>#{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}"
- enableMacroRendering="false"/>
-
- <hr/>
- <h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
- <br/>
-
- </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>
16 years, 7 months