分页在jsf rich:datascroller中不起作用 [英] Pagination not working in jsf rich:datascroller

查看:60
本文介绍了分页在jsf rich:datascroller中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过嵌套组件使 rich:datascoller 工作.数据表迭代工作正常,但分页不起作用. rich:datascroller 是否可以与嵌套组件一起使用?

how to make work rich:datascoller with nested components. Data table iteration works fine but pagination is not working. does rich:datascroller works with nested component?

    <a4j:repeat >
      <rich:datatable id="test"> 
          ......
      </rich:datatable>

      <rich:datascroller for="test"></rich:datascroller>
    </a4j:repeat >

任何帮助将不胜感激

推荐答案

首先请回答我在评论部分提出的问题.

Firstly please answer the my question asked in comment section.

关于您的问题,我不知道您为什么不添加Datatable的完整代码.如果您阅读了该组件的文档( Rich_Datascroller )下面提到的事情

About your issue i do not know why you did not add at lease full code of Datatable . If you read the documentation of the component(Rich_Datascroller) its mentioned below thing

    组件应放置在父表的页脚中,或通过"for"绑定到该表的页脚.属性.注意,用于"是指.是在视图构建而不是视图渲染上评估,这就是为什么它将忽略JSTL标签.
  1. 该表还应具有定义的行"(rows).属性限制了输入的表行的数量.
  2. 滚动器可以借助于"maxPages"来限制表格页面上呈现的链接的最大数量.属性.
  1. The component should be placed into the footer of the parent table or be bound to it with the "for" attribute. Note, that "for" is evaluated on view build, not on view render, that is why it will ignore JSTL tags.
  2. The table should also have the defined "rows" attribute limiting the quantity of inputted table rows.
  3. The scroller could limit the maximum quantity of rendered links on the table pages with the help of the "maxPages" attribute.

因此,根据以上几点,您看起来像是错过了

So according to above points its look like you missed

该表还应具有定义的行"(rows).属性限制输入的表行数.

The table should also have the defined "rows" attribute limiting the quantity of inputted table rows.

根据文档,它是强制性的.要记住一点.除了您的问题以外,在stackoverflow进行询问之前,最好的做法是创建一个简单的示例并立即尝试.

As per documentation its a mandatory. point to remember . Apart from your issue its good practice before asking in stackoverflow create a simple example and try it out of the box.

关于我的问题,我更想知道您的代码如何工作而不根据您的代码生成动态ID,而您的组件ID是Static.它应该抛出异常,因为< a4j:repeat> 只是一个for循环.

About my question I am more interested to know how your code will be work without generating dynamic id as per your code your component id is Static . It should throw the exception because <a4j:repeat> nothing but a for loop.

这篇关于分页在jsf rich:datascroller中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆