Package orm2 :: Package ui :: Package xist :: Module result_table :: Class andreas_pager
[hide private]
[frames] | no frames]

Class andreas_pager

source code

result_table_widget --+    
                      |    
                  pager --+
                          |
                         andreas_pager

Pager widget based on an idea by Andreas Junge of jungepartner, Witten (Germany) <http://www.jungepartner.de>.

It's a smart way of prividing page links for datasets of up to 1000 or so records.

Instance Methods [hide private]
  __call__(self, result_table, request, base_url)
  __call__1(self, result_table, request, base_url)
Obsolete old way of getting the needed rows from the RDBMS.
  __init__(self)
  fetch_row(self, result_table, row_no)
Fetch one row from the RDBMS, used to be called by __call1__().
  fetch_rows(self, result_table, primary_key_attributes, primary_key_data, orderby)
Fetch those rows indicated by the PRIMARY_KEY_DATA.
  format_value(self, dbobj)
Format a single value that goes laft and right of the -- in the page links.
  get_all_primary_keys(self, result_table, primary_key_columns, where, orderby)
Return a list of all relevant primary keys.
  row_condition(self, dbclass, key_attributes, key_data)
Return a list that goes into an sql.where() to select the particular row referenced by key_data.

Method Details [hide private]

__call__(self, result_table, request, base_url)
(Call operator)

source code 
Overrides: result_table_widget.__call__

__call__1(self, result_table, request, base_url)

source code 
Obsolete old way of getting the needed rows from the RDBMS.

__init__(self)
(Constructor)

source code 
None
Overrides: result_table_widget.__init__

fetch_row(self, result_table, row_no)

source code 
Fetch one row from the RDBMS, used to be called by __call1__().

fetch_rows(self, result_table, primary_key_attributes, primary_key_data, orderby)

source code 
Fetch those rows indicated by the PRIMARY_KEY_DATA.
Parameters:
  • primary_key_data - A list of tuples containing primary keys, as returned by get_all_primary_keys() above.
Returns:
A dict as {(pkey,): dbobj}

format_value(self, dbobj)

source code 
Format a single value that goes laft and right of the -- in the page links.

get_all_primary_keys(self, result_table, primary_key_columns, where, orderby)

source code 
Return a list of all relevant primary keys.
Returns:
A list of tuples.

row_condition(self, dbclass, key_attributes, key_data)

source code 
Return a list that goes into an sql.where() to select the particular row referenced by key_data.