title: Is it possible to get the ui:field value in java code in GWT?
body: <p>This may sound very weird, but let's start with an example:</p>
  
  <pre><code>&lt;my:MagicWidget ui:field="someFieldName" fieldName="someFieldName"/&gt;
  </code></pre>
  
  <p>It's pretty much asured that we'll always want to have the same value in ui:field and in fieldName. Clearly there is some duplucation in this code, I'd like to avoid it and make the fieldName optional. </p>
  
  <p>So, this is what I have in the widget's code:</p>
  
  <pre><code>@UiConstructor
  public MagicWidget(String fieldName) {
      this.fieldName = fieldName;
  }
  </code></pre>
  
  <p>But I'd like, if possible to allow this constructor to be optional, and provide an default constructor that would "by magic" find out it's ui:field value:</p>
  
  <pre><code>@UiConstructor
  public MagicWidget() {
      this.fieldName = /*some magic to get ui:field's value*/;
  }
  </code></pre>
  
  <p>I was wondering if there is a way to get the value of "ui:field" inside my MagickWidget? (The widget extends Composite). I fear this might not be possible, because most of the time it's not so useful, but if anyone has an idea - feel free to share!</p>
  
  <p>PS: I'm using GWT 2.1.0.RC1.</p>