cdi « Bean « JSF Q&A

1. JSF 2.0 Temlating and injection of MB || CDI bean

Problem: managed bean not injecting by template. Goal: I wan to decelerate logout button in template. Scenario: I am building j2ee 6 application with jsf 2.0 for web part. template file layout/template.xhtml


2. JSF 2 localization (managed bean)

I have a properties file for localization:

title=Widget Application
This is tied in as a resource-bundle in the faces-config:
I can access this just ...

3. JSF CDI : Conversation scope bean[s] best practice

I'm currently learning about JSF 2.0 and im so glad for the existence of this conversation scope feature, which is very helpful in opening a new tab or a new window ...

4. Access Managed Bean from thread outside FaceContext

I am developing an application with Glassfish 3.1 and Icesfaces 2.0 In my design, a @Named @SessionScoped Bean1 will spawn a thread in an action method (and interrupt it in @PreDestroy). When ...

5. JSF 2.0 - Possibilities of bean scopes

I posted a couple of questions but haven't gotten any reply yet. Everything I state here concerns JSF 2.0.* mostly. A typical bean contains information to be displayed on a page. Common ...

6. What is the idiomatic way to get references to other managed beans?

The way I see it, there are three ways to get a reference to another bean:

  1. Using CDI, I can @Inject a named bean. This has the drawback that CDI-annotations don't mix ...

7. JSF2 Managed Bean Reference Problem: CDI Injection?

I have a managed bean called:

public class configBean implements Serializable { 
that instantiates a class/bean (that isn't a managed bean its a standard class):
com.package.class variableName = new com.package.class(); 
& a number ...

8. JSF Bean property not updated

I have a bean with a field called 'name', and a JSF form that has an inputText mapped with this field. The initial value of the field is well displayed on ...

9. How to inject one @Named bean in other @Named bean in JSF2?

I have the following code:

public class SearchBean{
    private String title;
    private String author;
    // .... getters and setter s
In search.xhtml I have:
<h:inputText ...

10. Can CDI managed beans and JSF managed beans talk to each other?

I have a Tomcat 6 JSF web application that I'd like to set up with CDI beans. I will have to convert the project to CDI gradually though. My question is: ...

11. Backing Beans and CDI Beans