[seam-commits] Seam SVN: r7346 - trunk/src/main/org/jboss/seam.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Feb 3 09:18:57 EST 2008


Author: pete.muir at 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();
    }
    




More information about the seam-commits mailing list