The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CGI::Widget::DBI::Search::Display::Grid - Grid display class for Search widget

SYNOPSIS

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

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

DESCRIPTION

This class displays search results retrieved in the search widget in a grid format with each row in the dataset inhabiting its own cell. The dataset can be sorted via a drop-down menu at the upper-right of the grid, and paging links appear at the lower right.

METHODS

render_dataset()

Builds an HTML table in grid layout for current page in the dataset.

Builds data in object variables:

  dataset_cells_html
display_cell( $row )

Returns an HTML table cell rendering for row $row in the dataset. Called by render_dataset() for each row in the current page of search results.

display_dataset()

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

display_sort_popup()

Returns an HTML popup with possible columns to sort dataset by, whose values are the full navigation URIs. An onChange event causes the URI to be loaded, resorting the dataset.

_set_display_defaults()

Sets grid-layout specific default settings in addition to settings in AbstractDisplay.

SEE ALSO

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