问题
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
- 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.
- The table should also have the defined "rows" attribute limiting the quantity of inputted table rows.
- 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