When is the bean managed constructor called?

When is the Bean Managed Designer called? Is it called only once?

Thanks!

+6
source share
1 answer

A managed bean constructor call is made by the JFF Lifecycle process. It depends on how much volume is declared for the bean. If the Managed bean scope is a "request" than the JSF, provides one bean instance for each request. After the request completes, the bean state is undefined.

Another scope is the session scope, which means that one bean is provided for a full web session. Thus, you are responsible for the correct and correct bean state for the entire session.

There are some other areas that are relevant to the JSF life cycle and areas of managed objects.

Additionally, consider FacesContext and FacesServlet: Good description here: FacesContext life cycle?

+5
source

All Articles