lucee.Componentcontentbox.models.ui.Paging
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- COLDBOX SETTINGS - `PagingMaxRows` : The maximum number of rows per page. - `PagingBandGap` : The maximum number of pages in the page carrousel CSS SETTINGS: - `.pagingTabs` - The div container - `.pagingTabsTotals` - The totals - `.pagingTabsCarrousel` - The carrousel To use. You must use a "page" variable to move from page to page. ex: index.cfm?event=users.list&page=2 In your handler you must calculate the boundaries to push into your paging query.
rc.boundaries = getInstance( "Paging@contentbox" ).getBoundaries()Returns a struct: - `[startrow]` : the startrow to use - `[maxrow]` : the max row in this recordset to use. Ex: [startrow=11][maxrow=20] if we are using a PagingMaxRows of 10 To RENDER:
#getInstance( "Paging@contentbox" ).renderit( FoundRows, link )#`FoundRows` = The total rows found in the recordset `link` = The link to use for paging, including a placeholder for the page @page@ ex: index.cfm?event=users.list&page=@page@
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
PagingBandGap
|
true
|
false
|
|
any
|
controller
|
true
|
false
|
|
any
|
pagingMaxRows
|
true
|
false
|
|
any
|
settingService
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
struct
|
getBoundaries([numeric pagingMaxRows], [numeric page])
Calculate the startrow and maxrow. |
string
|
getController()
|
string
|
getPagingBandGap()
|
string
|
getPagingMaxRows()
|
string
|
getSettingService()
|
any
|
onDIComplete()
|
any
|
renderIt(numeric foundRows, any link, [numeric pagingMaxRows], [boolean asList='false'], [numeric page])
Render the pagination tabs UI. |
any
|
setController(any controller)
|
any
|
setPagingBandGap(any PagingBandGap)
|
any
|
setPagingMaxRows(any pagingMaxRows)
|
any
|
setSettingService(any settingService)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- coldboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- settingService@contentboxserializable
- trueMethod Detail |
---|
Calculate the startrow and maxrow
pagingMaxRows
- You can override the paging max rows herepage
- Which page to bound on, we look into the request context for a `page` if not passed.Render the pagination tabs UI
foundRows
- The rows found in the collection to build the pagination for.link
- The link to use, you must place the `@page@` place holder so the link can be created correctly. ex: /data/page/@page@pagingMaxRows
- You can override the paging max rows hereasList
- Render the UI as a list of pagination or tabspage
- The page we are on, if not passed, we look into the request context for a `page` variable.controller
PagingBandGap
pagingMaxRows
settingService