title: How to use injection via GIN with UiBinder and Widgets?
body: <p>I'm using GWT 2.4 with gwt-platform 0.7 and gin 1.5.0.</p>
  
  <p>I've built a library for dynamic (live) translation of my GWT application. So every widget will get notified when the <code>LocaleChangeEvent</code> gets fired and then ask my <code>TranslationDictionary</code> to get the new String to display.</p>
  
  <p>The widgets actually look like this:</p>
  
  <pre><code>public class LocaleAwareLabel extends Label implements LocaleChangeEventHandler {
      TranslationDictionary dictionary;
      String translationToken;
  
      public LocaleAwareLabel(TranslationDictionary dictionary, EventBus eventBus, String translationToken) {
          this.dictionary = dictionary;
          this.translationToken = translationToken;
          eventBus.addHandler(LocaleChangeEvent.TYPE, this);
          getCurrentTranslationFromDictionary();
      }
  
      public void getCurrentTranslationFromDictionary() {
          this.setText(dictionary.getTranslation(translationToken));
      }
  
      @Override
      public void onLocaleChange(LocaleChangeEvent event) {
          getCurrentTranslationFromDictionary();
      }
  }
  </code></pre>
  
  <p>As you can see: I can't easily use this widget with UiBinder, at the moment I inject <code>EventBus</code> and  <code>TranslationDictionary</code> in my <code>View</code> and use <code>@UiField(provided=true)</code>like this:</p>
  
  <pre><code>@UiField(provided=true)
  LocaleAwareLabel myLabel;
  
  @Inject
  public MyView(TranslationDictionary dictionary, EventBus eventBus) {
      widget = uiBinder.createAndBindUi(this);
  
      myLabel = new LocaleAwareLabel(dictionary, eventBus, "someTranslationToken");
  }
  </code></pre>
  
  <p><strong>What I'd like to have:</strong> Using my widgets without <code>@UiField(provided=true)</code>, so I can simply put them inside a <code>ui.xml</code> like this:</p>
  
  <pre><code>&lt;custom:LocaleAwareLabel ui:field="myLabel" translationToken="someTranslationToken" /&gt;
  </code></pre>
  
  <p>I know I can set the <code>translationToken</code> via UiBinder using:</p>
  
  <pre><code>public void setTranslationToken(String translationToken) {
      this.translationToken = translationToken;
  }
  </code></pre>
  
  <p>But then I still have the problem that I can't use a zero-args constructor because of <code>EventBus</code> and <code>TranslationDictionary</code>. And additionaly I can't call the <code>getCurrentTranslationFromDictionary()</code> inside the constructor, because the value of <code>translationToken</code> of course gets set after the constructor.</p>
  
  <p>Would be nice if someone can provide a solution, maybe with code examples.</p>
  
  <p>And P.S. I'm a total injection-noob, but from my understanding gin may somehow solve my problem. But I don't know how.</p>
  
  <p>Thank you!</p>