contentbox.models.ui

Class Paging

lucee.Component
    extended by contentbox.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@

Class Attributes:
  • threadsafe
  •  
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • author : Luis Majano
  •  
    Property Summary
    type property default serializable required
    any PagingBandGap


    • access = public
    • returntype = any
    true false
    any controller


    • access = public
    • returntype = any
    • inject = coldbox
    true false
    any pagingMaxRows


    • access = public
    • returntype = any
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = settingService@contentbox
    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

    init

    public init()

    Constructor


    Property Detail

    PagingBandGap

    property any PagingBandGap

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    controller

    property any controller

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox
    serializable - true

    pagingMaxRows

    property any pagingMaxRows

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    settingService

    property any settingService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - settingService@contentbox
    serializable - true

    Method Detail

    getBoundaries

    public struct getBoundaries([numeric pagingMaxRows], [numeric page])

    Calculate the startrow and maxrow

    Parameters:
    pagingMaxRows - You can override the paging max rows here
    page - Which page to bound on, we look into the request context for a `page` if not passed.
    Returns:
    struct of { startrow:numeric, maxrow:numeric }

    getController

    public string getController()


    getPagingBandGap

    public string getPagingBandGap()


    getPagingMaxRows

    public string getPagingMaxRows()


    getSettingService

    public string getSettingService()


    onDIComplete

    public any onDIComplete()


    renderIt

    public any renderIt(numeric foundRows, any link, [numeric pagingMaxRows], [boolean asList='false'], [numeric page])

    Render the pagination tabs UI

    Parameters:
    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 here
    asList - Render the UI as a list of pagination or tabs
    page - The page we are on, if not passed, we look into the request context for a `page` variable.

    setController

    public any setController(any controller)

    Parameters:
    controller

    setPagingBandGap

    public any setPagingBandGap(any PagingBandGap)

    Parameters:
    PagingBandGap

    setPagingMaxRows

    public any setPagingMaxRows(any pagingMaxRows)

    Parameters:
    pagingMaxRows

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService