org.springframework.beans.support.PagedListHolder
public class PagedListHolder
extends Object
implements Serializable
PagedListHolder is a simple state holder for handling lists of objects, separating them into pages. Page numbering starts with 0.
This is mainly targetted at usage in web UIs. Typically, an instance will be instantiated with a list of beans, put into the session, and exported as model. The properties can all be set/get programmatically, but the most common way will be data binding, i.e. populating the bean from request parameters. The getters will mainly be used by the view.
Supports sorting the underlying list via a SortDefinition implementation, available as property "sort". By default, a MutableSortDefinition instance will be used, toggling the ascending value on setting the same property again.
The data binding names have to be called "pageSize" and "sort.ascending", as expected by BeanWrapper. Note that the names and the nesting syntax match the respective JSTL EL expressions, like "myModelAttr.pageSize" and "myModelAttr.sort.ascending".
[url]http://www.iocblog.net/project/springmvc/springmvc-856.html[/url]
public class PagedListHolder
extends Object
implements Serializable
PagedListHolder is a simple state holder for handling lists of objects, separating them into pages. Page numbering starts with 0.
This is mainly targetted at usage in web UIs. Typically, an instance will be instantiated with a list of beans, put into the session, and exported as model. The properties can all be set/get programmatically, but the most common way will be data binding, i.e. populating the bean from request parameters. The getters will mainly be used by the view.
Supports sorting the underlying list via a SortDefinition implementation, available as property "sort". By default, a MutableSortDefinition instance will be used, toggling the ascending value on setting the same property again.
The data binding names have to be called "pageSize" and "sort.ascending", as expected by BeanWrapper. Note that the names and the nesting syntax match the respective JSTL EL expressions, like "myModelAttr.pageSize" and "myModelAttr.sort.ascending".
[url]http://www.iocblog.net/project/springmvc/springmvc-856.html[/url]
本文介绍 Spring 中 PagedListHolder 类的功能与使用方法。PagedListHolder 主要用于 Web UI 的分页处理,支持通过 SortDefinition 实现排序。通常实例化后放入会话并导出为模型。
1527

被折叠的 条评论
为什么被折叠?



