Annotation Type NamedEvent
-
@Documented @Retention(RUNTIME) @Target(TYPE) @Inherited public @interface NamedEvent
The presence of this annotation on a class automatically registers the class with the runtime as a
ComponentSystemEvent
for use with the<f:event />
tag in a page. The value of theshortName()
attribute is taken to be the short name for theComponentSystemEvent
. If the shortName has already been registered, the current class must be added to a List of of duplicate events for that name. If the event name is then referenced by an application, aFacesException
must be thrown listing the shortName and the offending classes.- Since:
- 2.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
shortName
The value of this annotation attribute is taken to be the short name for theComponentSystemEvent
.
-
-
-
Element Detail
-
shortName
String shortName
The value of this annotation attribute is taken to be the short name for the
ComponentSystemEvent
. If the value of this attribute is ommitted, the following algorithm must be used by the code that processes this annotation to determine its value.-
Get the unqualified class name (e.g.,
UserLoginEvent
) -
Strip off the trailing "Event", if present (e.g.,
UserLogin
) -
Convert the first character to lower-case (e.g.,
userLogin
) -
Prepend the package name to the lower-cased name.
- Returns:
- the short name
- Default:
- ""
-
-
-