template::paginator::get_display_info (public)
template::paginator::get_display_info name datasource page
Defined in packages/acs-templating/tcl/paginator-procs.tcl
Make paginator display properties available as a onerow data source:
next_page: following page or empty string if at end previous_page: preceding page or empty string if at beginning next_group: page that begins the next page group or empty string if at end previous_group: page that begins the last page group or empty string if at endl. page_count: the number of pages
- Parameters:
- name (required)
- The reference to the paginator object.
- datasource (required)
- The name of the onerow datasource to create
- page (required)
- A page number representing the reference point from which the display properties are calculated.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: get_reference upvar 2 $datasource info if { $page > $properties(page_count) } { set page $properties(page_count) } set group [get_group $name $page] set groupsize $properties(groupsize) set info(page_count) $properties(page_count) set info(group_count) $properties(group_count) set info(current_page) $page set info(current_group) $group set info(groupsize) $groupsize array set info { next_page {} previous_page {} next_group {} previous_group {} next_page_context {} previous_page_context {} next_group_context {} previous_group_context {} } if { $page > 1 } { set info(previous_page) [expr {$page - 1}] } if { $page < $properties(page_count) } { set info(next_page) [expr {$page + 1}] } if { $group > 1 && $groupsize > 1 } { set info(previous_group) [expr {($group - 2) * $groupsize + 1}] } if { $group < $properties(group_count) && $groupsize > 1 } { set info(next_group) [expr {$group * $groupsize + 1}] } # If the paginator is contextual, set the context if { [info exists properties(context_ids)] } { foreach elm { next_page previous_page next_group previous_group } { if { [info exists info($elm)] && $info($elm) ne "" } { set info(${elm}_context) [lindex $properties(context_ids) $info($elm)-1] } } }XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-templating/tcl/paginator-procs.xql