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

LEGAL

#===========================================================================

Copyright (C) 2008 by Nik Ogura. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Bug reports and comments to nik.ogura@gmail.com.

#===========================================================================

NAME

CGI::Lazy::BoilerPlate

SYNOPSIS

        use CGI::Lazy::Boilerplate;

        my $b1 = CGI::Lazy::Boilerplate->new({

                        id      => 'frobnitz',

                        fieldlist       => [qw(prodCode quantity unitPrice productGross prodCodeLookup.description)],

                        type            => 'dataset, multiple',

                        style           => 'funkystyle', #unsupported as of yet

                        });

        $b1->buildTemplate;

        $b1->buildCss;

        my $b2 = CGI::Lazy::Boilerplate->new({

                        id              => 'glortswaggle',

                        fieldlist       => [qw(merchant batch post_date cardnum tailno authCode icao invoicenum invtotal trandate country countryname)],

                        type            => 'dataset, single',

                        });

        $b2->buildTemplate;

        $b2->buildCss;

        my $b3 = CGI::Lazy::Boilerplate->new({

                        id              => 'glortswaggle',

                        fieldlist       => [qw(merchant batch post_date cardnum tailno )],

                        type            => 'dataset, singleMulti',

                        });

        $b3->buildTemplate;

DESCRIPTION

CGI::Lazy::Boilerplate is a module to generate boilerplate template examples for Lazy widgets. The templates generated can then be customized to do whatever you want, and look like whatever you want. Some pieces of template syntax might be confusing to users of Lazy, so this will generate a nice starting point for you.

METHODS

buildCss ()

Builds a prototype css file of style set in object creation for widget in question, or a blank style if none is specified.

buildCssClean ()

Builds clean css file for widget.

buildTemplate ()

Builds a template appropriate for widget of type specified in object creation.

new (args)

Constructor

args

id => 'some unique id' #id of the resulting template div

fieldlist => [qw(field1 field2 field3)] # list of field names

type => 'widgetype, templatetype' #which widget and template type stub to build

types

dataset, multi # multiple rows of text boxes corresponding to records of a select query

dataset, single # One record of a query

dataset, singleMulti # template to display when a search returns more than one record, that allows the user to pick the specific record desired

dataset, multiRO # multiple rows of text- no input fields read only view of dataset

dataset, multiHeadings # column headings for a multi or multiRO split into a separate div so scrolling of a long list doesn't make you loose the headings in the scroll.