public IBasicTableModel getModel() {
return new IBasicTableModel() {
public int getRowCount() {
System.out.println("called many times....");
return getServiceLayer().countTotalCategoryRow(getKeyword());
}
}
当我尝试这个并在控制台上打印输出时,它显示了这个方法 getRowCount() 被调用多次。这在 Tapestry 4 中正常吗?
最佳答案
我不知道自 11 月份以来您在这方面是否取得了任何进展,但它可以在初始渲染期间调用一次,并在倒带周期中调用一次。
此外,实现 IBasicTableModel
的匿名类需要实现 getCurrentPageRows
方法 - 但您可能已经知道了;)
关于java - Tapestry 4 contrib表多次调用getModel(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1747432/