title: GWT Editor Framework - Show ENUM using ValueListBox in own editor
body: <p>I have an Enum <code>SupplierCode</code>:</p>
  
  <pre><code>public enum SupplierCode
  {       
      BG("British Gas"), CNG("Contract Natural Gas"), COR("Corona Energy");
  
      private String value;
  
      SupplierCode(String value)
      {
          if(value != "")
          {
              this.value = value;
          }
      }
  
      // ... toString() and fromString() omitted for brevity
  
      // for editor framework (?)
      public String getValue()
      {
          return value;
      }
      public void setValue(String value)
      {
          this.value = value;
      }
  }
  </code></pre>
  
  <p>I display it in my editors using a <code>ValueListBox</code>:</p>
  
  <pre><code>@UiField(provided = true)
  ValueListBox&lt;SupplierCode&gt; supplierCode = new ValueListBox&lt;SupplierCode&gt;(new AbstractRenderer&lt;SupplierCode&gt;()
  {
      @Override
      public String render(SupplierCode object)
      {
          return object == null ? "" : object.toString();
      }
  });
  
  // in the constructor
  public ContractEditor()
  {
      initWidget(uiBinder.createAndBindUi(this));
      supplierCode.setAcceptableValues(Arrays.asList(SupplierCode.values()));
  }
  </code></pre>
  
  <p>I have to edit this type a few times in my app so I wanted to make an editor for just this dropdown, called <code>SupplierCodeEditor</code>:</p>
  
  <pre><code>public class SupplierCodeEditor extends Composite implements Editor&lt;SupplierCode&gt;
  {
      private static SupplierCodeEditorUiBinder uiBinder = GWT.create(SupplierCodeEditorUiBinder.class);
  
      interface SupplierCodeEditorUiBinder extends UiBinder&lt;Widget, SupplierCodeEditor&gt;
      {
      }
  
      @UiField(provided = true)
      ValueListBox&lt;SupplierCode&gt; value = new ValueListBox&lt;SupplierCode&gt;(new AbstractRenderer&lt;SupplierCode&gt;()
      {
          @Override
          public String render(SupplierCode object)
          {
              return object == null ? "" : object.toString();
          }
      });
  
      public SupplierCodeEditor()
      {
          initWidget(uiBinder.createAndBindUi(this));
          value.setAcceptableValues(Arrays.asList(SupplierCode.values()));
      }
  
  }
  </code></pre>
  
  <p>However, when I use it, although it renders the list ok with the options, it doesn't select the actual value from the list. I thought having the getValue() and setValue() methods would work but seemingly not.</p>
  
  <p><strong>Does anyone know of a way to put this in one editor file?</strong> Then I won't have to repeat the code for the renderer and call setAcceptableValues() every place I want to use it.</p>