adding the new form system

This commit is contained in:
JT Smith 2005-07-26 15:55:15 +00:00
parent fe0d968d87
commit 7d95169b38
26 changed files with 2160 additions and 1073 deletions

View file

@ -252,6 +252,30 @@ sub _uiLevelChecksOut {
}
}
#-------------------------------------------------------------------
=head2 AUTOLOAD ()
Dynamically creates functions on the fly for all the different form control types.
=cut
sub AUTOLOAD {
our $AUTOLOAD;
my $name = (split /::/, $AUTOLOAD)[-1];
my @params = @_;
my $cmd = "use WebGUI::Form::".$name;
eval ($cmd);
if ($@) {
WebGUI::ErrorHandler::error("Couldn't compile form control: ".$name.". Root cause: ".$@);
return undef;
}
my $class = "WebGUI::Form::".$name;
return $class->new(@params)->toHtmlWithWrapper;
}
#-------------------------------------------------------------------
=head2 asset ( name, label, value, class, extras, subtext, defaultValue, uiLevel )