8 Replies Latest reply on Aug 31, 2011 3:15 AM by craiggreenhalgh

    Do all injectable beans need a Provider class?

    craiggreenhalgh

      Hi I'm moving all my injection from GIN to Errai IOC

       

      What I'd like to do is inject view implementations into activities.

       

      Do all beans that I want to be injectable require a provider class?

       

      If so how do I handle inner injection values as all my providers are similar to

       

      @IOCProvider

      @Singleton

      public class LoginViewProvider implements Provider<LoginView> {

       

          public LoginView get() {       

              return GWT.create(LoginViewImpl.class);

          }

         

      }

       

      What I'd like is the LoginViewImpl to have an injectable bean 'user' that is a result of a @Produces method.

       

      Is this possible?

       

      Many thanks

       

      Craig