title: JSF 2.0: @ResourceDependency does not work when adding UIComponent programmatically
body: <pre><code>@ResourceDependency(library = "component/myComponent", name = "myComponent1.css")
  public class MyComponent1 extends UIComponentBase {
  
      public void encodeBegin(FacesContext context) throws IOException {
          MyComponent2 comp2 = new MyComponent2();
          getChildren().add(comp2);
      }
  
  }
  
  @ResourceDependency(library = "component/myComponent", name = "myComponent2.css")
  public class MyComponent2 extends UIComponentBase {
  
      // ...
  
  }
  </code></pre>
  
  <p><code>myComponent1.css</code> gets included into page, <code>myComponent2.css</code> does not.</p>
  
  <p>Feature? Bug? Configuration issue?</p>
  
  <p>It there programmatic way to add resources to maybe workaround this?</p>
  
  <p>Running Mojarra 2.0.2</p>