1 package Reaction::UI::Widget::Field;
3 use Reaction::UI::WidgetClass;
7 has id => (isa => 'Str', is => 'ro', lazy_build => 1);
8 has name => (isa => 'Str', is => 'ro', lazy_build => 1);
10 implements build_id => as { shift->viewport->event_id_for('value'); };
11 implements build_name => as { shift->viewport->event_id_for('value'); };
13 widget renders [qw/label field message/
14 => { id => func('self', 'id'),
15 name => func('self', 'name'),
16 viewport => func('self', 'viewport'), }
19 field renders [ string { $_{viewport}->value }, ];
21 label renders [ string { $_{viewport}->label }, ];
22 message renders [ string { $_{viewport}->message }, ];
32 Reaction::UI::Widget::Field
50 Returns the viewport's C<event_id_for('value')>
54 Returns the viewport's C<event_id_for('value')>
60 Additional variables available in topic hash: "viewport", "id", "name".
62 Renders "label","field" and "message"
66 C<content> will contain the value, if any, of the field.
70 C<content> will contain the label, if any, of the field.
74 C<content> will contain the message, if any, of the field.
78 See L<Reaction::Class> for authors.
82 See L<Reaction::Class> for the license.