开发者

How to create a paginated table in JSF 1.2 where backing bean is request scoped

开发者 https://www.devze.com 2023-02-28 11:05 出处:网络
How to create a paginated ta开发者_开发问答ble in JSF 1.2 where backing bean is request scoped.To the point, you want to retain a specific set of parameters in the subsequent request, such as the curr

How to create a paginated ta开发者_开发问答ble in JSF 1.2 where backing bean is request scoped.


To the point, you want to retain a specific set of parameters in the subsequent request, such as the current page. You can pass those extra parameters as <h:inputHidden> so that they are available in the next request, or use the Tomahawk's <t:saveState> to simulate a scope which is similar to the JSF 2.0 view scope.

Long story and a lot of code short, there's a blog article about this with complete code snippets: effective datatable paging and sorting.


  1. if you get all the table data with query i'd strongly suggest storing it in session bean. You can use another bean just for the data.

  2. Another way is to just get the data thats currently displayed (limit). On switching the page you also send the "position"

  3. For doing it only in client side you have to use somekind of javascript/ajax library ( http://www.jsfmatrix.net/ ) ...

0

精彩评论

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

关注公众号