From the course: Java EE 8: JavaServer Faces JSF 2.3

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Inject more into managed beans

Inject more into managed beans

From the course: Java EE 8: JavaServer Faces JSF 2.3

Start my 1-month free trial

Inject more into managed beans

- [Instructor] JSF 2.3 is integrated even more tightly with CDI like I mentioned earlier. One of the perks of this is that we can now inject so much more than we were able to using the earth @Inject annotation. I did a fair bit of injection into the LoginBean from earlier. So has that LoginBean and I'm injecting the FacesContext, the ExternalContext, a SecurityContext, even the HTTPServerRequest. Here's some other components you can inject. So you can inject the InitParameterMap, HeaderValuesMap, the FlowMap, QuestCookieMap and I'm sure you can kind of guess what these do. The InitParameterMap refers to all the server context initialization parameters that you define your web, the XML. You've got the SessionMap, you've got the ViewMap, the HeaderMap and the ApplicationMap. Some of these need a qualifier annotation in addition to the earth inject annotation, the map type implementations especially. So for example you need a…

Contents