public
classPagedListHolder
implements
Serializable
Overview
Inheritance
Members
Usage
Source
Books
Since19.05.2003
VersionNot specified.
Author(s)Juergen Hoeller
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
that toggles the ascending value on setting the same property again is used.
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".
This class just provides support for an unmodifiable List of beans.
If you need on-demand refresh because of Locale or filter changes,
consider RefreshablePagedListHolder.
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 that toggles the ascending value on setting the same property again is used.
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".
This class just provides support for an unmodifiable List of beans. If you need on-demand refresh because of Locale or filter changes, consider RefreshablePagedListHolder.