NAME
DBIx::HTMLView::CGIView - Common CGI functions for the viewers
SYNOPSIS
package MyCGIViewer
require DBIx::HTMLView::CGIView; @ISA = qw(DBIx::HTMLView::CGIView);
sub new { my $self=DBIx::HTMLView::CGIView::new(@_);
# ...
}
DESCRIPTION
This class some basic functions that can be used to create cgi interfaces to a HTMLView database. And is therefor suited as a base class for viewr or edit classes.
METHODS
$view=DBIx::HTMLView::CGIView->new($script, $db, $cgi)
Creates a new CGIView object that will use the url $script for future requests to the database $db (a DBIx::HTMLVIew::DB object) and $cgi is the CGI object containing the request we got from the user.
$view->script =head2 $view->script_name
Returns the name of the script we should use for future calls as set by the $script param to the constructor.
$view->lnk =head2 $view->link_data
Returns a string that can be included in a link that will set the params that is supposed to be presistand between requests. Curent that is only one: _Table which is set to the name of the table we are currently working on.
$view->form_data
Will return the same data as $view->link_data but in form of <input type=hidden ...> tags to be included in a html form instead.
$view->db
Returns the database (a DBIx::HTMLView::DB object) we'r using, as set by the $db parameter to the constructor.
$view->cgi
Returns the CGI object as set by the $cgi parameter to the constructor.
$view->tab
Returns the table (a DBIx::HTMLView::Table object) we're currently working with. Either as specified in the CGI query or the first table found in the database if none was defined.