1 package Reaction::UI::Widget::Field;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
8 before fragment widget {
9 if ($_{viewport}->can('value_string')) {
10 arg 'field_value' => $_{viewport}->value_string;
12 arg 'field_value' => ''; #$_{viewport}->value;
16 implements fragment label_fragment {
17 if (my $label = $_{viewport}->label) {
18 arg label => localized $label;
23 __PACKAGE__->meta->make_immutable;
32 Reaction::UI::Widget::Field
40 Additional variables available in topic hash: "viewport", "id", "name".
42 Renders "label","field" and "message"
46 C<content> will contain the value, if any, of the field.
50 C<content> will contain the label, if any, of the field.
54 C<content> will contain the message, if any, of the field.
58 See L<Reaction::Class> for authors.
62 See L<Reaction::Class> for the license.