title: How to remove "no data" labels from empty nodes in GWT?
body: <p>I have a widget that inherits from <code>CellTree</code>. If the node not have the child elements, this node can be opened and shows <code>"no data"</code> label.</p>
  
  <p>I'd like to see nodes without child's displayed as empty.</p>
  
  <p>That's how I fill the tree. My <code>DictionaryTreeDataProvider</code> class (relevant part):</p>
  
  <pre><code>public class DictionaryTreeDataProvider extends ListDataProvider&lt;MValue&gt; {
      private final DictionariesServiceAsync service = GWT.create(DictionariesService.class);
  
      ...    
  
      @Override
      public void onRangeChanged(HasData&lt;MValue&gt; result) {
          service.queryDictionaryValues(range, query, new AsyncCallback&lt;SubsetResult&lt;MValue&gt;&gt;() {
              @Override
              public void onFailure(Throwable t) {
              }
  
              @Override
              public void onSuccess(SubsetResult&lt;MValue&gt; result) {
                  getList().clear();
                  for (MValue value : result.items) {
                      getList().add(value);
                  }
              }
          });
      }
  }
  </code></pre>
  
  <p>On the server side I make EJB call which fills <code>SubsetResult</code>.
  I found that this problem fixed in version of GWT-2.5.0-rc2 (see <a href="https://groups.google.com/forum/#!topic/google-web-toolkit/d-rFUmyHTT4" rel="nofollow noreferrer">https://groups.google.com/forum/#!topic/google-web-toolkit/d-rFUmyHTT4</a>).</p>
  
  <hr>
  
  <p>Now everything is OK, thanks to @moutellou. 
  I did as he suggested:</p>
  
  <pre><code>...
  @Override
  public void onSuccess(SubsetResult&lt;MValue&gt; result) {
      if (result.length == 0) {
          updateRowCount(-1, true);
          return;
      } else {
          for (MValue value : result.items) {
              // some checks here
              getList().add(value);
          }
      }
  }
  ...
  </code></pre>