我正在使用 GWT2.3。我们通过覆盖 SimplePager 开发了 CustomPager。
我们覆盖 createText() 方法,使用以下代码显示类似“Page 1 of 4”的字符串
public String createText() {
if(searchRecordCount%pageSizeForText == 0){
totalPages = searchRecordCount/pageSizeForText;
}else{
totalPages = (searchRecordCount/pageSizeForText) + 1;
}
NumberFormat formatter = NumberFormat.getFormat("#,###");
return "Page "+formatter.format(this.getPage()+1) + " of " + formatter.format(totalPages);
}
现在我想为 CurrentPage 使用 TextBox,以便用户可以在 textBox 中输入页码。(功能GoTo输入的pageNumber)
createText() 返回字符串,所以我不能使用 textBox ;) + 不能提供 css
我怎样才能做到这一点 ?有没有办法解决这个问题?解决方法(如果有)或示例代码