title: How to inject one @Named bean in other @Named bean in JSF2?
body: <p>I have the following code:</p>
  
  <pre><code>@Named
  @RequestScoped
  public class SearchBean{
      private String title;
      private String author;
      // .... getters and setter s
  }
  </code></pre>
  
  <p>In <code>search.xhtml</code> I have:</p>
  
  <pre><code>&lt;h:inputText value="#{searchBean.title}" /&gt;
  &lt;h:commandButton action=#{srchUI.action}"/&gt;
  </code></pre>
  
  <p>And I have also the following ControllerBean:</p>
  
  <pre><code>@Named("srchUI")
  @RequestScoped
  public class SearchUIController {
      public String action(){
          // ...
      }
  }
  </code></pre>
  
  <p>I want to access the <code>SearchBean.title</code> in <code>action()</code> method... how to do it? How to inject this bean in my UI Controller?</p>