title: How to inject entire managed bean via @ManagedProperty annotation?
body: <p>I'm trying to inject entire JSF managed bean into another managed bean by means of <code>@ManagedProperty</code> annotation (very similar to <a href="https://stackoverflow.com/questions/4469365">Possible to inject @ManagedBean as a @ManagedProperty into @WebServlet?</a>, but I'm injecting into a bean, not a servlet). This is what I'm doing:</p>
  
  <pre><code>@ManagedBean
  public class Foo {
    @ManagedProperty(value = "#{bar}")
    private Bar bar;
  }
  
  @ManagedBean
  public class Bar {
  }
  </code></pre>
  
  <p>Doesn't work (JSF 2.0/Mojarra 2.0.3):</p>
  
  <pre><code>SEVERE: JSF will be unable to create managed bean foo when it is 
  requested.  The following problems where found:
  - Property bar for managed bean foo does not exist. Check that 
    appropriate getter and/or setter methods exist.
  </code></pre>
  
  <p>Is it possible at all or I need to do this injection programmatically via <code>FacesContext</code>?</p>