开发者

rich:dataList pagination?

开发者 https://www.devze.com 2023-01-09 15:01 出处:网络
I know y开发者_开发百科ou can use a <rich:datascroller> when you want pagination on a <rich:dataTable>.But, what about a <rich:dataList> or <rich:dataOrderedList>?Is there any

I know y开发者_开发百科ou can use a <rich:datascroller> when you want pagination on a <rich:dataTable>. But, what about a <rich:dataList> or <rich:dataOrderedList>? Is there any mechanism for pagination on these components? Or will I have to code in the logic by hand?


Nowhere it is said that <rich:datascroller> works only with <rich:dataTable>. So I'd assume it works with most iteration tags - try it.

If it for some reason doesn't, you can easily emulate the appearance of a list using a table (with proper css)


It would be very easy to build your own dataScroller. You can use the first and rows attributes on the <rich:dataList> component.

To accomplish this task all you have to do is write a bean that will handle the attribute values

<rich:dataList id="myList" first="#{dataScrollerBean.first}" rows="#{dataScrollerBean.rows}">
<a4j:commandButton action="#{dataScrollerBean.prev}" value="< Prev" reRender="myList"/>
<a4j:commandButton action="#{dataScrollerBean.next}" value="Next >" reRender="myList"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号