1 package Reaction::UI::Widget::Field::Collection;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
8 before fragment widget {
9 arg 'label' => localized $_{viewport}->label;
12 implements fragment list {
13 render 'item' => over $_{viewport}->value_names;
16 implements fragment item {
17 arg 'name' => localized $_;
20 __PACKAGE__->meta->make_immutable;
30 Reaction::UI::Widget::Field::Collection - A field representing a collection
34 This field class will render a collection of values found in the viewport's
35 C<value_names> and localised before passed to the layout.
41 renders C<label> and C<list> passing additional variable "viewport"
45 C<content> contains the viewport's label
49 renders fragment item over the viewport's C<value_names>
53 C<content> contains the value of the current item ($_ / $_{_})
59 share/skin/base/layout/field/collection.tt
61 The following layouts are provided:
67 Renders the C<label_box> and C<list> fragments.
71 Renders a C<span> element containing the C<label> argument.
75 Renders the C<item>s inside a C<div> and C<ul> element.
79 Renders the C<name> argument inside a C<li> element.
85 share/skin/default/layout/field/collection.tt
87 This layout set extends the C<NEXT> one in the parent skin.
89 The following layouts are provided:
95 The same as in the C<base> skin, except the label is surrounded by
102 See L<Reaction::Class> for authors.
106 See L<Reaction::Class> for the license.