1 package Reaction::UI::Widget::Field::Container;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
7 before fragment widget {
8 arg name => $_{viewport}->name;
11 implements fragment maybe_label {
12 return unless $_{viewport}->has_label;
13 arg label => $_{viewport}->label;
17 implements fragment field_list {
18 render field => over $_{viewport}->fields;
21 implements fragment field {
25 __PACKAGE__->meta->make_immutable;
33 Reaction::UI::Widget::Field::Container - A field containing multiple values
37 This widget implements a field containing multiple value viewports found in
38 the current viewport's C<fields> attribute.
44 Sets the C<name> argument to the viewport's C<name> attribute.
48 Sets the C<label> argument to the viewport's C<label> attribute value and
49 renders the C<label> fragment when the viewport has a label defined.
53 Sequentially renders the C<fields> of the viewport;
57 Renders the C<field> viewport passed by C<field_list>
63 share/skin/base/layout/field/container.tt
65 The following layouts are provided:
71 Renders a C<fieldset> element containing the C<maybe_label> and C<field_list>
76 Renders a C<legend> element for the C<fieldset> containing the C<label> argument.
80 Wraps the next C<field> fragment in a C<span> element.
86 See L<Reaction::Class> for authors.
90 See L<Reaction::Class> for the license.