Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 3ba6d43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/WebGUI/Asset.pm
Expand Up @@ -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 },
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3ba6d43

Please sign in to comment.