Usage of javax.inject.Named with javax.annotation.ManagedBean
Taken from the following:
http://www.primefaces.org/showcase-labs ... neMenu.jsf
Why do I have to use @ManagedBean to get it to work?
If I use just @Named it does not work? Am I causing a problem by using them both together?
What is the difference between @Named and @ManagedBean?
// PlayerConverter.java
@FacesConverter("playerConverter")
public class PlayerConverter implements Converter, Serializable {
...
}
// AutoCompleteBean.java
@SessionScoped
@Named
@ManagedBean
public class AutoCompleteBean implements Serializable {
...
}
Usage of javax.inject.Named with javax.annotation.ManagedBea
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
@Named and javax.enterprise.context.*Scoped should be used with CDI, @ManagedBean with plain JSF.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Information
-
Who is online
Users browsing this forum: No registered users and 56 guests