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'), }
18 field renders [ string { $_{viewport}->value }, ];
20 label renders [ string { $_{viewport}->label }, ];
21 message renders [ string { $_{viewport}->message }, ];
31 Reaction::UI::Widget::Field
49 Returns the viewport's C<event_id_for('value')>
53 Returns the viewport's C<event_id_for('value')>
59 Additional variables available in topic hash: "viewport", "id", "name".
61 Renders "label","field" and "message"
65 C<content> will contain the value, if any, of the field.
69 C<content> will contain the label, if any, of the field.
73 C<content> will contain the message, if any, of the field.
77 See L<Reaction::Class> for authors.
81 See L<Reaction::Class> for the license.