DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Orestis Pantazos
Orestis Pantazos

Posted on

πŸ”₯ JavaServer Faces Cheat Sheet

The JSF framework supports these annotations but are deprecated in JSF 2.3 and will not be used anymore.

Annotation Annotation Class
@RequestScoped javax.faces.bean.RequestScoped
@SessionScoped javax.faces.bean.SessionScoped
@ApplicationScoped javax.faces.bean.ApplicationScoped
@ViewScoped javax.faces.bean.ViewScoped
@NoneScoped javax.faces.bean.NoneScoped
@CustomScoped(value="#{someMap}") javax.faces.bean.CustomScoped

It is recommended to use JSF CDI annotations as shown in the following table:

Annotation (CDI) Annotation Class
@RequestScoped javax.enterprise.context.RequestScoped
@SessionScoped javax.enterprise.context.SessionScoped
@ApplicationScoped javax.enterprise.context.ApplicationScoped
@FlowScoped javax.faces.flows.FlowScoped
@Dependent javax.enterprise.context.Dependent

Top comments (0)

Take a look at this:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›