6 Replies Latest reply on May 5, 2008 12:36 PM by Rocco None

    Accessing method from another class

    Rocco None Newbie

      Hello,


      I encountered a problem which I cannot solve, I think I just don't see it. Well, heres the thing. I have stateful seam component and another stateless seam component. Now the stateful component does its work an at one point it needs to call a method from another stateless component.


      So I injected this component like this


      @In(create=true)
      private StatelessComponent stcp;
      




      If I try to access methods stcp.someMethod()... I doesn't work:


      ErrorMessage:
      @In attribute requires non-null value: statefulComp.stcp


      Why isn't that stcp component initialized? How can I force that? I also tried

      required=false

      on the @In tag, but then it won't be created at all.


      thanks for reeding
      rocco