Author: danielc.roth
Date: 2008-10-22 14:15:29 -0400 (Wed, 22 Oct 2008)
New Revision: 9381
Modified:
trunk/src/main/org/jboss/seam/Component.java
Log:
JBSEAM-2402
Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java 2008-10-22 16:06:39 UTC (rev 9380)
+++ trunk/src/main/org/jboss/seam/Component.java 2008-10-22 18:15:29 UTC (rev 9381)
@@ -80,6 +80,7 @@
import org.jboss.seam.annotations.datamodel.DataModel;
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.annotations.intercept.InterceptorType;
import org.jboss.seam.annotations.intercept.Interceptors;
import org.jboss.seam.annotations.security.PermissionCheck;
@@ -325,6 +326,10 @@
{
if ( getBeanClass().isAnnotationPresent(Converter.class) )
{
+ if(!getBeanClass().isAnnotationPresent(BypassInterceptors.class))
+ throw new IllegalStateException("Converter " +
getBeanClass().getName()
+ + " must be annotated with @BypassInterceptors");
+
Converter converter = getBeanClass().getAnnotation(Converter.class);
if ( converter.forClass()!=void.class )
{
@@ -335,6 +340,10 @@
}
if ( getBeanClass().isAnnotationPresent(Validator.class) )
{
+ if(!getBeanClass().isAnnotationPresent(BypassInterceptors.class))
+ throw new IllegalStateException("Validator " +
getBeanClass().getName()
+ + " must be annotated with @BypassInterceptors");
+
Validator validator = getBeanClass().getAnnotation(Validator.class);
String id = validator.id().equals("") ? getName() :
validator.id();
init.getValidators().put( id, getName() );
Show replies by date