DBIx::HTMLView::Field - Base class for field classes




  print $fld->view_html;


This is a subcalss of DBIx::HTMLView::Fld used to represent fields in the databse as well as the data contained in it. Except for the methods decsribed in the DBIx::HTMLView::Fld man page this class contains some methods for handling the data contain in the field. They are described below.

It also contains default implementations of all the virtual methods except name_vals described in that man page. For viewing this means the value is used without any formating (both for text and html), and for the edit_html method a standard <input size=80 ...> tag is used.

The size 80 can be changed by setting the edit_size key to the wanted size in the $data hash passed to the new method, see DBIx::HTMLView::Fld.


package DBIx::HTMLView::Field; use strict; use Carp;

use vars qw(@ISA); require DBIx::HTMLView::Fld; @ISA = qw(DBIx::HTMLView::Fld);


Returns the value of this field if it's value is set. otherwise it dies with ``Field conatins no data''.


Return true if the value of this field is set (defined).

$fld->view_fmt($fmt_name, $fmt)

Se DBIx::HTMLView::Fld for a general description. As for the format of the fmt string used here, the following substrings will be replaced with described values:

$val - The value of this field $name - The name of this field
