Sry it was an incomplete post . Here is my full post . I am new to Injection . What I wanted to do was a simple Interface Injection in my GWT IMpl . Can anyone tell me how do a Field Injection or a construction based Injection .Assume Everything in this snippet works fine .
public Interface Payment( public void pay(); } public class PaymentImpl implements Payment { public void pay() { System.out.println("I'll pay with a credit card"); } } //My Guice Module public class TestGuiceModule extends AbstractModule { @Override protected void configure() { bind(Payment.class).to(PaymentImpl.class); } } //My Actual GWT Servlet public class MyServiceImpl extends RemoteServiceServlet implements MyService { private Payment payment; @Inject public MyServiceImpl (Payment payment) { Injector injector = Guice.createInjector(new TestGuiceModule()); payment= injector.getInstance(Payment.class); this.payment = payment // This works in terms of i get the instance of the object , but I am sure this is not the right apprach . Can anyone suggest whats the correct method of doing } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.