template::paginator::get_row_ids (public)

 template::paginator::get_row_ids name pagenum

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

Gets a list of IDs in a page, selected from the master ID list generated by the initial query submitted for pagination. IDs are typically primary key values.

Parameters:
name (required)
The reference to the paginator object.
pagenum (required)
A number ranging from one to the number of pages in the query result.
Returns:
A Tcl list of row identifiers.

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

Testcases:
No testcase defined.
Source code:
    get_reference

    set pagesize $properties(pagesize)
    set page_offset $properties(page_offset)

    # get the set of ids for the current page
    set start [expr {($pagenum - $page_offset - 1) * $pagesize}]
    set end [expr {$start + $pagesize - 1}]
    set ids [lrange $properties(row_ids) $start $end]

    return $ids
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-templating/tcl/paginator-procs.xql

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