--- trunk/lib/Frey/Action.pm 2008/11/17 15:24:24 371 +++ trunk/lib/Frey/Action.pm 2008/11/17 15:42:12 372 @@ -97,8 +97,11 @@ my $html = qq|

$class params

|; foreach my $name ( grep { ! $class->meta->get_attribute($_)->is_lazy } $self->attributes ) { + my $attr_type; my $type = $name =~ m/^pass/ ? 'password' : 'text'; + my $label = $name; my $value = ''; + my $label_title = ''; my $value_html = ''; if ( ref($params) eq 'HASH' ) { $value = $params->{$name}; @@ -110,19 +113,26 @@ } @$params ) . qq||; } elsif ( my $attr = $class->meta->get_attribute( $name ) ) { - if ( $attr->has_type_constraint && $attr->type_constraint->can('values') ) { - $value_html = qq||; - } elsif ( $attr->has_default ) { - $value = $attr->default( $name ); + $attr_type = $attr->type_constraint->name; + if ( $attr->has_type_constraint ) { + if ( $attr->type_constraint->can('values') ) { + $value_html = qq||; + } elsif ( $attr_type !~ m{^(Str|Int)$} ) { + $value_html = qq||; + } } + $value = $attr->default( $name ) if ! $value && $attr->has_default; + $label_title = qq| title="| . $attr->documentation . qq|"| if $attr->has_documentation; } else { warn "wired attribute $name"; } - $value_html = qq|| unless $value_html; + + $value_html = qq|| unless $value_html; + # warn "# required $name ", $class->meta->get_attribute( $name )->dump( 2 ); - $html .= qq|| . $value_html; + $html .= qq|| . $value_html; } $html .= qq|
|;