[jboss-cvs] jboss-seam/src/main/org/jboss/seam/interceptors ...
Gavin King
gavin.king at jboss.com
Mon May 21 13:45:04 EDT 2007
User: gavin
Date: 07/05/21 13:45:04
Modified: src/main/org/jboss/seam/interceptors EventInterceptor.java
Log:
JBSEAM-1117, let @RaiseEvent raise multiple event types
Revision Changes Path
1.6 +12 -3 jboss-seam/src/main/org/jboss/seam/interceptors/EventInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EventInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/EventInterceptor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- EventInterceptor.java 21 Dec 2006 02:38:27 -0000 1.5
+++ EventInterceptor.java 21 May 2007 17:45:04 -0000 1.6
@@ -49,11 +49,20 @@
{
if ( method.isAnnotationPresent(RaiseEvent.class) )
{
- String type = method.getAnnotation(RaiseEvent.class).value();
- if ( "".equals(type) ) type = method.getName();
+ String[] types = method.getAnnotation(RaiseEvent.class).value();
+ if ( types.length==0 )
+ {
+ Events.instance().raiseEvent( method.getName() );
+ }
+ else
+ {
+ for (String type: types )
+ {
Events.instance().raiseEvent(type);
}
}
+ }
+ }
return result;
}
}
More information about the jboss-cvs-commits
mailing list