Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Class::DBI::Plugin::HTML 0.9

    Download button

    No screenshots available
    Downloads: 355  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Aaron Johnson | More programs
    Perl Artistic License / FREE
    November 29th, 2006, 22:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Class::DBI::Plugin::HTML description

    A Perl module to generate HTML Tables and Forms in conjunction with Class::DBI.

    Class::DBI::Plugin::HTML is Perl module to generate HTML Tables and Forms in conjunction with Class::DBI.

    SYNOPSIS

    # Inside of your sub-class of Class::DBI add these lines:
    use Class::DBI::Plugin::HTML;
    use Class::DBI::Pager;
    use Class::DBI::AbstractSearch;
    use Class::DBI::Plugin::AbstractCount;
    use Class::DBI::Plugin::RetrieveAll;

    .....

    # Inside your script you will be able to use this modules
    # methods on your table class or object as needed.

    use ClassDBIBaseClass;
    use URI::Escape;
    use CGI;

    my $cgi = CGI->new();

    my $cdbi_plugin_html = Baseball::Master->html();

    $cdbi_plugin_html->data_table->addRow('Last Name','First Name','Bats' , 'Throws' ,
    'Height (ft)','(inches)',
    'Weight','Birth Year' );

    my %params;

    map { $params{$_} =
    uri_unescape($cgi->param("$_"))
    } $cgi->param();

    $cdbi_plugin_html->params( %params );
    $cdbi_plugin_html->exclude_from_url([ 'page' ]);

    # attribute style
    # created based on params and exclude values from above
    # auto sets the query_string value
    $cdbi_plugin_html->url_query();

    # set the page name (script)
    $cdbi_plugin_html->page_name('cdbitest.pl');

    # indicate which columns to display
    $cdbi_plugin_html->display_columns( [ 'lastname','firstname',
    'bats' ,'throws',
    'ht_ft' ,'ht_in',
    'wt' ,'birthyear' ]
    );

    # indicate which columns to exclude, inverse of display above
    $cdbi_plugin_html->exclude_columns();

    # indicate the base class to work with, this is optional,
    # if you should create you object via a call to
    # Class::DBI::Plugin::HTML vs. a Class::DBI sub class
    # this assures the correct sub class is used for data collection
    $cdbi_plugin_html->cdbi_class( 'Baseball::Master' );

    # indicate the style of navigation to provide
    $cdbi_plugin_html->navigation_style( 'both' );

    print qq~Filter by First Letter of Last Name~;

    print $cdbi_plugin_html->string_filter_navigation(
    -column => 'lastname',
    -position => 'begins',
    );

    print qq~~;

    $cdbi_html->only('firstname');


    print $cdbi_plugin_html->build_table();

    my $nav = $cdbi_plugin_html->html_table_navigation();

    print qq!$navn!;

    $cdbi_plugin_html->add_bottom_span($nav);

    print $cdbi_plugin_html->data_table;

    UPGRADE WARNING

    As of the .8 release there have been changes to the methods and how they work. It is likely that scripts built with older versions WILL break. Please read below to find specific changes that may negatively impact scripts built using the the releases prior to .8. The .9 release contains some minor modifications that could in some chases break your scripts, test carefully before upgrading in a production environment.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    generate HTML Tables | generate HTML Forms | Perl module | Class::DBI::Plugin:: | generate | HTML

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM