[英]Supressing rowsPerPage (pagination) in Grid of Tapestry
Is there any way in Tapestry 5 to suppress pagination for a gird component? Tapestry 5中有什么方法可以抑制网格物体组件的分页?
I searched all over the internet, couldn't find a solution. 我在整个互联网上搜索,找不到解决方案。 I have a requirement to display a grid with the full list regardless of it's length. 我需要显示一个带有完整列表的网格,而不管其长度如何。 My observations: 我的观察:
t:rowsPerPage=0
but got a divide by zero error. 我尝试了t:rowsPerPage=0
但除以零错误。 rowsPerPage
entirely, I see 25 rows. 如果我完全删除rowsPerPage
, rowsPerPage
看到25行。 (Looks like this must be the default value.) (看起来必须是默认值。) 只需将每页的行数设置为非常大的数目
You can see from the javadoc that the default is symbol:tapestry.components.grid_rows_per_page
so you could override this symbol if you'd like to do it globally. 您可以从Javadoc中看到默认值是symbol:tapestry.components.grid_rows_per_page
因此,如果您想在全局范围内使用,可以覆盖此符号。 Another option is: 另一个选择是:
TML TML
<t:grid source="..." rowsPerPage="prop:rowsPerPage" />
Java 爪哇
public int getRowsPerPage() {
return Integer.MAX_VALUE;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.