GWT: How to programmatically reload CellBrowser?

后端 未结 4 1933
旧时难觅i
旧时难觅i 2021-02-08 21:31

I\'m using GWT 2.1\'s CellBrowser with a custom TreeViewModel. The TreeViewModel in turn uses an AsyncDataProvider to fetch data dynamically. This all

4条回答
  •  名媛妹妹
    2021-02-08 21:54

    I had the same problem and this worked for me:

     List dataToTable = ....
    
    int firstPosition = this.pager.getDisplay().getVisibleRange().getStart();
    this.dataProvider.updateRowData(firstPosition, dataToTable);
    
    int rowCount = this.pager.getPageStart() + dataToTable.size();
    this.dataProvider.updateRowCount(rowCount, exactCount);
    

    Where the "pager" is a SimplePager to control the table pagination.

    Hope this helps!

提交回复
热议问题