Adi Fairbank > CGI-Widget-DBI-Search-0.27 > CGI::Widget::DBI::Search::Display::Table

Download:
CGI-Widget-DBI-Search-0.27.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source   Latest Release: CGI-Widget-DBI-Search-0.31

NAME ^

CGI::Widget::DBI::Search::Display::Table - HTML table display class for Search widget

SYNOPSIS ^

  my $ws = CGI::Widget::DBI::Search->new(q => CGI->new);
  ...
  $ws->{-display_class} = 'CGI::Widget::DBI::Search::Display::Table';

  # or instead, simply:
  $ws->{-display_mode} = 'table';

  # note: this is default behavior for the search widget, so this is all just for
  # informational purposes, e.g. to write your own display class

DESCRIPTION ^

This class displays search results retrieved in the search widget in table format, much like the output from a typical relational database client. The dataset can be sorted via column header anchor tags, and paging links appear on all corners of the table display, as well as a list of navigable page ranges at bottom center.

METHODS ^

render_dataset()

Builds HTML table rows for current page in the dataset, including a header row with the visible columns with sortable columns as clickable anchor tags.

Builds data in object variables:

  dataset_rows_html
  header_columns
  header_html
render_column_headers()

Called by render_dataset() to render just the column headers (along with sort links) for the most recent search.

display_dataset()

Returns HTML rendering of current page in search results, along with navigation links.

display_row( $row )

Returns HTML rendering of given $row in dataset: '<tr> ... </tr>'. Calls display_field($row, $header_col) for each header column.

display_field( $row, $col )

Returns HTML rendering of given $row / $col in dataset: '<td> ... </td>'. Calls display_record($row, $col), inherited from CGI::Widget::DBI::Search::AbstractDisplay for the cell contents.

SEE ALSO ^

CGI::Widget::DBI::Search::AbstractDisplay

syntax highlighting: