8 Replies Latest reply: Aug 31, 2011 3:15 AM by Craig Greenhalgh RSS

    Do all injectable beans need a Provider class?

    Craig Greenhalgh Newbie

      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