Skip to content
Permalink
Browse files

Allow noFormPost to be dynamically generated with a sub. Not all prop…

…erty settings allow this!
  • Loading branch information...
perlDreamer committed Nov 4, 2011
1 parent a2a8218 commit 3ba6d43ec967889cad461a7f22778e2ec1534192
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/WebGUI/Asset.pm
@@ -1276,9 +1276,13 @@ sub getFieldData {
my $attr = $self->meta->find_attribute_by_name( $property );
my $fieldType = $attr->fieldType;
my $fieldOverrides = $overrides->{ $property } || {};
my $noFormPost = $attr->noFormPost;
if (ref $noFormPost eq 'CODE') {
$noFormPost = $self->$noFormPost;
}
my $fieldHash = {
fieldType => $fieldType,
noFormPost => $attr->noFormPost,
noFormPost => $noFormPost,
tab => "properties",
%{ $self->getFormProperties( $property ) },
%{ $overrides },
@@ -1878,6 +1882,7 @@ exception.
sub loadModule {
my ($class, $className) = @_;
if ($className !~ /^WebGUI::Asset(?:::\w+)*$/ ) {
warn $className;
WebGUI::Error::InvalidParam->throw(param => $className, error => "Not a WebGUI::Asset class",);
}
(my $module = $className . '.pm') =~ s{::}{/}g;

0 comments on commit 3ba6d43

Please sign in to comment.
You can’t perform that action at this time.