What is the difference between javax.enterprise.inject.Model
and javax.inject.Named
? Both are available from JSF EL.
@Model
is just a shortcut for a @RequestScoped @Named
(in other words @model
is a stereotype which incorporates other annotations more about stereotypes here)
therefore
@Model
public class MainBean {
//...
is equal to
@Named
@RequestScoped
public class MainBean {
//...