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".
http://www.iocblog.net/project/springmvc/springmvc-856.html
分享到:
相关推荐
PagedListHolder则是一个简单的JavaBean,可以用于在Action类中存储分页信息,然后传递到视图层。 3. **Hibernate框架中的分页** Hibernate本身提供了`Criteria`和`Query`对象的分页方法,如`setFirstResult`和`...
`PagedListHolder`允许开发者在内存中存储和管理分页数据,而`Pageable`接口则定义了分页查询的规范,包括页码、大小等信息。Spring还提供了`Page`接口,它不仅包含实际的数据,还提供了总条数、总页数等分页信息。...
分页标签库如`DisplayTag`或`PagedListHolder`提供了一种声明式的方式来实现分页功能。这些标签库通过在JSP页面中插入特定的标签,可以轻松地创建分页链接和显示分页信息。例如,`<display:table>`标签可以用来显示...
1. **配置分页插件**:Struts2有多种分页插件可供选择,如DisplayTag、PagedListHolder等。这里我们假设使用Struts2的PagingAndSortingResult插件。在struts.xml配置文件中,添加相关的拦截器和结果类型。 2. **...
PagedListHolder PagedListSourceProvider ParameterDisposer ParameterHandlerMapping ParameterizableViewController ParameterizableViewController ParameterizedRowMapper ParameterMapper ...