DEV Community

Orestis Pantazos
Orestis Pantazos

Posted on

3 1

🔥 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

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs