Pagination not working in jsf rich:datascroller

廉价感情. 提交于 2019-12-11 06:17:00

问题


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 >

any help will be greatly appreciated


回答1:


Firstly please answer the my question asked in comment section.

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

  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

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

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.

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.



来源:https://stackoverflow.com/questions/41457243/pagination-not-working-in-jsf-richdatascroller

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!