CGI-Lazy

 view release on metacpan or  search on metacpan

lib/CGI/Lazy/Widget/Dataset.pm  view on Meta::CPAN


}

1

__END__

=head1 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. 

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

=head1 NAME

CGI::Lazy::Widget::Dataset

=head1 SYNOPSIS

	use CGI::Lazy;

	our $q = CGI::Lazy->new({

					tmplDir 	=> "/templates",

					jsDir		=>  "/js",

					plugins 	=> {

						mod_perl => {

							PerlHandler 	=> "ModPerl::Registry",

							saveOnCleanup	=> 1,

						},

						dbh 	=> {

							dbDatasource 	=> "dbi:mysql:somedatabase:localhost",

							dbUser 		=> "dbuser",

							dbPasswd 	=> "letmein",

							dbArgs 		=> {"RaiseError" => 1},

						},

						session	=> {

							sessionTable	=> 'SessionData',

							sessionCookie	=> 'frobnostication',

							saveOnDestroy	=> 1,

							expires		=> '+15m',

						},

					},

				});



	my $widget = $q->widget->dataset({

				id		=> 'detailBlock',

				type		=> 'multi',

				template	=> "lazydemoDetailBlock.tmpl",

				headings 	=> {
							template 	=> 'pathwidgetheader.tmpl',

							id		=> 'pathwidgetheader',
						},

	#					nodelete	=> 1,

				lookups		=> {

						prodcodeLookup  => {

							sql 		=> 'select ID, description from prodCodeLookup', 

							preload 	=> 1,

							orderby		=> ['ID'],

							output		=> 'hash',

							primarykey	=> 'ID',

						},

							

				},

				recordset	=> $q->db->recordset({

							table		=> 'detail', 

							fieldlist	=> [

										{name => 'detail.ID', 

											hidden => 1},

										{name => 'invoiceid', 



( run in 2.411 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )