[英]Asynchronous DataProvider, CellTable, Pager “Last page Button”
我正在使用带有Page和异步DataProvider的CellTable。 Everthing工作正常,页面的“最后一页”按钮被禁用。 这可能是因为Asynchronous DataProvider可以提供额外的数据,因此不知道他将拥有多少记录以及最后一页是什么。 但是我知道数据传递何时完成,所以我可以显示最后一页。
我怎么能告诉Asynchronous DataProvider,没有更多数据,他应该显示最后一页Button?
BR,Stefan
我使用带有uiBinder的SimplePager遇到了同样的问题。 SimplePager的默认构造函数显示一个前进按钮,而不是最后一页...
然后我使用@UiField(provided = true)作为SimplePager,并使用以下构造函数:
pager = new SimplePager(TextLocation.LEFT, (Resources) GWT.create(SimplePager.Resources.class), false, 0, true);
匹配:
public SimplePager(TextLocation location,
Resources resources, boolean showFastForwardButton,
final int fastForwardPages, boolean showLastPageButton)
您是否尝试将updateRowCount(count,exact)函数中的exact
标志设置为true?
还要确保按此顺序调用更新功能:
setRowCount(length, true);
setRowData(0, data);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.