template::paginator::get_page (public)

 template::paginator::get_page name rownum

Defined in packages/acs-templating/tcl/paginator-procs.tcl

Calculates the page on which the specified row is located.

Parameters:
name - The reference to the paginator object.
rownum - A number ranging from one to the number of rows in the query result, representing the number of a row therein.
Returns:
A number ranging from one to the number of pages in the query result, representing the number of the page the specified row is located in.

Partial Call Graph (max 5 caller/called nodes):
%3 template::paginator::create template::paginator::create (public) template::paginator::get_page template::paginator::get_page template::paginator::create->template::paginator::get_page template::paginator::get_reference template::paginator::get_reference (private) template::paginator::get_page->template::paginator::get_reference

Testcases:
No testcase defined.
Source code:
    get_reference

    set pagesize $properties(pagesize)

    return [expr {($rownum - 1 - (($rownum - 1) % $pagesize)) / $pagesize + 1}]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/paginator-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: