Why are there different bean management annotations

javax.enterprise.context.SessionScoped(JSR 346) and all other annotations under the javax.enterprise.context.* package maintain the context of CDI. CDI provides an alternative, versatile and more powerful mechanism for dependency injection, bean and general resource management within the Java EE space. It’s an alternative to JSF managed beans and it’s set to even supersede the JSF bean management mechanism … Read more

What’s the view build time?

The view build time is not a phase. The view build time is that moment when the physical UIViewRoot instance and all of its children is built based on the view declaration, which is usally defined in XHTML or JSP files. The view build time moment is not restricted to a specific JSF lifecycle phase. … Read more

How to call JSF backing bean method only when onclick/oncomplete/on… event occurs and not on page load

This approach will not work. You seem to be confusing/mixing the basic web development concepts of the “server side” and “client side” and to be misunderstanding the role of JSF and EL. JSF is a server side language which runs on the webserver upon a HTTP request and produces HTML/CSS/JS code which get returned with … Read more

PrimeFaces CSS look’n’feel missing and JS “Uncaught Reference Error: PrimeFaces is not defined”

PrimeFaces will auto-include the necessary JS/CSS resources in <h:head>. However, you don’t have that tag. You’ve there a “plain HTML” <head>. Fix it accordingly: <html> <h:head> … </h:head> <h:body> … </h:body> </html> This mistake should also have been logged in the server log as below: One or more resources has the target of ‘head’ but … Read more