Home

Castle Stronghold

PaginationHelper API Document

This helper allows you to easily paginate through a data source (anything that implements System.Collections.IList)

Constructors

PaginationHelper()

Initializes a new instance of the Castle.MonoRail.Framework.Helpers.PaginationHelper class.

Methods

CreatePageLink(Int32 page, String text) : String

Creates a link to navigate to a specific page

ParameterDescription
page Page index
text Link text

CreatePageLink(Int32 page, String text, IDictionary htmlAttributes) : String

Creates a link to navigate to a specific page

ParameterDescription
page Page index
text Link text
htmlAttributes Attributes for the anchor tag

CreatePageLink(Int32 page, String text, IDictionary htmlAttributes, IDictionary queryStringParams) : String

Creates a link to navigate to a specific page

ParameterDescription
page Page index
text Link text
htmlAttributes Attributes for the anchor tag
queryStringParams Query string entries for the link

CreatePagination(IList datasource, Int32 pageSize) : IPaginatedPage

Creates a Castle.MonoRail.Framework.Helpers.Page which is a sliced view of the data source

ParameterDescription
datasource Data source to be used as target of the pagination
pageSize Page size

CreatePagination(IList datasource, Int32 pageSize, Int32 currentPage) : IPaginatedPage

Creates a Castle.MonoRail.Framework.Helpers.Page which is a sliced view of the data source

ParameterDescription
datasource Data source to be used as target of the pagination
pageSize Page size
currentPage current page index (1 based)

CreateCachedPagination(String cacheKey, Int32 pageSize, DataObtentionDelegate dataObtentionCallback) : IPaginatedPage

Creates a Castle.MonoRail.Framework.Helpers.Page which is a sliced view of the data source. This method first looks for the datasource in the System.Web.Caching.Cache and if not found, it invokes the dataObtentionCallback and caches the result using the specifed cacheKey

ParameterDescription
cacheKey Cache key used to query/store the datasource
pageSize Page size
dataObtentionCallback Callback to be used to populate the cache

Google
Search WWW Search castleproject.org