webtier@glassfish.java.net

JSF annotations on interface or abstract class

From: <webtier_at_javadesktop.org>
Date: Thu, 10 Dec 2009 06:36:03 PST

Can we use JSF 2 annotations like @ManagedBeans or @SessionScoped for interfaces and abstract classes? I mean, will it works if I implement an interface which declares some annotation(s) and the managed bean class itself doesn't have annotations?

An example:

@ManagedBean
public abstract class MyAbstractClass {
....
}

public class MyClass extends MyAbstractClass {
....
}

Does it work if I access MyClass by ValueExpression #{myAbstractClass} ? Will be MyClass automatically annotated with @ManagedBean?

Thanks in advance!
Oleg.
[Message sent by forum member 'ova2' ]

http://forums.java.net/jive/thread.jspa?messageID=375774