title: GWT UiBinder CellTable is not rendered with AsyncDataProvider
body: <p>I want to have on my page created with <code>UIBinder</code> a <code>CellTable</code> with data, received from server.
  I think I dont quite understand the logic of <code>UiBinder</code>. What steps should I do before calling <code>initWidget()</code>, and what I shouldn't  ? <br> When I remove the call to <code>configureDataProvider()</code> the table appears, but it is empty, with progress bar running. When I include <code>configureDataProvider()</code>, the table is not rendered at all.</p>
  <p><strong>Please can you explain what is happening here?</strong></p>
    <pre class="lang-java prettyprint-override"><code>@UiField(provided = true)
  VerticalPanel tableSelection;
  
  @UiField(provided = true)
  Anchor productTableAnchor;
  
  @UiField(provided = true)
  Anchor ordersTableAnchor;
  
  @UiField(provided = true)
  Anchor staffTableAnchor;
  List&lt;ProductDTO&gt; products;
  
  @UiField(provided = true)
  CellTable&lt;ProductDTO&gt; productTable;
  
  @UiField(provided = true)
  SimplePager pager;
  
  public TableSelectionWidget() {
  SimplePager.Resources pagerResources = GWT
      .create(SimplePager.Resources.class);
  tableSelection = new VerticalPanel();
  productTableAnchor = new Anchor();
  ordersTableAnchor = new Anchor();
  staffTableAnchor = new Anchor();
  productTable = new CellTable&lt;ProductDTO&gt;();
  productTable.setPageSize(10);
  configureTable();
  pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 0,
      true);
  pager.setDisplay(productTable);
  initWidget(uiBinder.createAndBindUi(this));
  }
  
  private void configureTable() {
  Column&lt;ProductDTO, String&gt; nameColumn = new Column&lt;ProductDTO, String&gt;(
      new TextCell()) {
      @Override
      public String getValue(ProductDTO object) {
      return object.getName();
      }
  };
  Column&lt;ProductDTO, String&gt; priceColumn = new Column&lt;ProductDTO, String&gt;(
      new TextCell()) {
      @Override
      public String getValue(ProductDTO object) {
      return object.getPrice().toString();
      }
  };
  Column&lt;ProductDTO, String&gt; quantityColumn = new Column&lt;ProductDTO, String&gt;(
      new TextCell()) {
      @Override
      public String getValue(ProductDTO object) {
      return String.valueOf(object.getQuantity());
      }
  };
  productTable.addColumn(nameColumn, &quot;Name&quot;);
  productTable.addColumn(priceColumn, &quot;Price&quot;);
  productTable.addColumn(quantityColumn, &quot;Qty&quot;);
  
  configureDataProvider();
  
  }
  
  private void configureDataProvider() {
  AsyncDataProvider&lt;ProductDTO&gt; provider = new AsyncDataProvider&lt;ProductDTO&gt;() {
      @Override
      protected void onRangeChanged(HasData&lt;ProductDTO&gt; display) {
      final int start = display.getVisibleRange().getStart();
      int length = display.getVisibleRange().getLength();
      AsyncCallback&lt;List&lt;ProductDTO&gt;&gt; callback = new AsyncCallback&lt;List&lt;ProductDTO&gt;&gt;() {
          public void onFailure(Throwable caught) {
          Window.alert(caught.getMessage());
          }
  
          public void onSuccess(List&lt;ProductDTO&gt; result) {
          products = result;
          updateRowData(start, result);
          }
      };
  
      productService.getAllProducts(callback);
      }
  };
  
  provider.addDataDisplay(productTable);
  provider.updateRowCount(products.size(), true);
  }
  </code></pre>
  <p>EDIT Added ui.xml</p>
  <pre><code>    &lt;!DOCTYPE ui:UiBinder SYSTEM &quot;http://dl.google.com/gwt/DTD/xhtml.ent&quot;&gt;
  &lt;ui:UiBinder xmlns:ui=&quot;urn:ui:com.google.gwt.uibinder&quot;
      xmlns:g=&quot;urn:import:com.google.gwt.user.client.ui&quot; xmlns:c=&quot;urn:import:com.google.gwt.user.cellview.client&quot;
      xmlns:ct=&quot;urn:import:com.ooo1sk.client.widgets&quot;&gt;
      &lt;ui:style&gt;
      &lt;/ui:style&gt;
      &lt;g:HTMLPanel&gt;
          &lt;g:VerticalPanel styleName=&quot;&quot; ui:field=&quot;tableSelection&quot;&gt;
              &lt;g:Anchor ui:field=&quot;ordersTableAnchor&quot; text=&quot;Orders&quot;&gt;&lt;/g:Anchor&gt;
              &lt;g:Anchor ui:field=&quot;productTableAnchor&quot; text=&quot;Product&quot;&gt;&lt;/g:Anchor&gt;
              &lt;g:Anchor ui:field=&quot;staffTableAnchor&quot; text=&quot;Staff&quot;&gt;&lt;/g:Anchor&gt;
          &lt;/g:VerticalPanel&gt;
          &lt;g:HTMLPanel&gt;
              &lt;table cellspacing='0' cellpadding='0' style='width:100%;'&gt;
                  &lt;tr&gt;
                      &lt;td valign='top'&gt;
                          &lt;c:CellTable addStyleNames='infoTable' pageSize='15'
                              ui:field='productTable' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td align='center'&gt;
                          &lt;c:SimplePager ui:field='pager' /&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/g:HTMLPanel&gt;
      &lt;/g:HTMLPanel&gt;
  &lt;/ui:UiBinder&gt; 
  </code></pre>
  <p>UPD: after changes it works, but keeps showing me only the first 15 rows, however Pager shows all 91 rows and changes number after clicking.</p>
  <pre><code> private void configureDataProvider() {
  
      AsyncDataProvider&lt;ProductDTO&gt; provider = new AsyncDataProvider&lt;ProductDTO&gt;() {
          @Override
          protected void onRangeChanged(HasData&lt;ProductDTO&gt; display) {
          final int start = display.getVisibleRange().getStart();
          final int length = display.getVisibleRange().getLength();
     
          productService
              .getAllProducts(new AsyncCallback&lt;List&lt;ProductDTO&gt;&gt;() {
  
                  public void onSuccess(List&lt;ProductDTO&gt; result) {
                  label.setText(&quot;start &quot; + start + &quot; &quot;
                      + &quot;resultsize &quot; + result.size() + &quot; &quot;
                      + &quot;length &quot; + length);
                  products = result;
                  updateRowCount(result.size(), true);
                  updateRowData(start, result);
  
                  }
  
                  public void onFailure(Throwable caught) {
                  Window.alert(caught.getMessage());
                  }
              });
          }
      };
      provider.addDataDisplay(productTable);
      }
  </code></pre>
  <p>Ok, playing with numbers fixed the issue. in <code>updateRowData(start, result);</code> I changed <code>start</code> to <code>0</code> and it works fine now. Still, I would greatly appreciate any comment of experts on this.</p>