我们正在尝试将 3 个表放在同一页面中,并使用某种同步分页。由于 ace:datatable 中的“paginator”属性对于每个表来说都是单独的,因此我们使用一些 commandLink 来实现向前和向后移动的功能。
我们尝试使用表中的“page”属性,将它们全部链接到支持 bean 中的属性,该属性通过 commandLink 的操作方法递增或递减。但此“page”属性仅在“paginator”属性设置为 true 时才有效。而且因为我们不想显示分页器本身(带有编号的页面、按钮和其他所有内容),所以我们不能使用此属性。
我们也尝试过 ace:datatable 的“first”属性,并再次将此属性绑定(bind)到 backing-bean。但它不会执行任何操作:当我们更改此属性的值时,表仍保留在填充它们的列表的相同位置。
我们正在使用个性化的 ArrayList 填充表(其中是与数据库中的表匹配的类)。只有在表中启用分页器并使用“page”属性时,事情才起作用。
我们也使用了 Datamodel 对象,但没有取得积极的结果。
那么,ace:datatable 的“first”属性有什么用呢? (请不要告诉我这个属性的 API 定义,我已经读过很多次了;))。一位同事说,当他使用ice:datatable 而不是 ACE 时,他就成功了。
有谁知道实现此场景的更好解决方案(3个数据表具有相同的分页,因此当您单击“前进”时,所有数据表都会移动到相同的位置)?
提前致谢。
更新:我已通过 IceSoft 论坛收到回复。 nils.lundquist 说:
The cause of this issue appears to have been some legacy pagination code in the library that the ace:dataTable was forked from. It isn't recognizable as part of our features, so I've corrected the issue and, assuming testing goes well, the fix will appear in our coming release (beta also).
Note that first still won't have an effect when component controlled pagination is enabled, and I've adjusted the TLD to reflect this. First will now actually work when pagination is disabled.
引用本周发布的iceFaces 3.1.0 beta02。
如果有人知道更好的方法来解决这种情况(3 个链接分页的数据表),我们将不胜感激。
TIA。
最佳答案
通过升级到 IceFaces 3.1.0 解决
关于java - ace :datatable work? 中的 "first"属性如何,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10853806/