4 Replies Latest reply on Feb 23, 2010 11:29 PM by Daniel Hinojosa

    Programmatic component creation

    Ben Erridge Newbie

      I have a seam component that needs to dynamically create a number of other seam components which need injection to work.


      For instance




      @Name("componentCreator")
      @Scope(ScopeType.CONVERSATION)
      public class ComponentCreator{
      @Create
      public void init() {
      for(String name: componentNames){
                  MyComponentClass component = new MyComponentClass();
                  //...somehow register component for injection and management...
              }
      }
      }




      Is there a way to do this with seam?


      Thanks in advance