Author: pete.muir(a)jboss.org
Date: 2008-02-03 09:18:57 -0500 (Sun, 03 Feb 2008)
New Revision: 7346
Modified:
trunk/src/main/org/jboss/seam/Seam.java
Log:
JBSEAM-2195
Modified: trunk/src/main/org/jboss/seam/Seam.java
===================================================================
--- trunk/src/main/org/jboss/seam/Seam.java 2008-02-03 01:34:11 UTC (rev 7345)
+++ trunk/src/main/org/jboss/seam/Seam.java 2008-02-03 14:18:57 UTC (rev 7346)
@@ -19,6 +19,8 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.faces.Converter;
+import org.jboss.seam.annotations.faces.Validator;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
@@ -62,6 +64,13 @@
{
return clazz.isAnnotationPresent(Scope.class) ?
clazz.getAnnotation(Scope.class).value() :
+ getDefaultComponentScope(clazz);
+ }
+
+ public static ScopeType getDefaultComponentScope(Class<?> clazz)
+ {
+ return ( clazz.isAnnotationPresent(Validator.class) ||
clazz.isAnnotationPresent(Converter.class) ) ?
+ ScopeType.STATELESS :
getComponentType(clazz).getDefaultScope();
}
Show replies by date