renaming widget packages to match new viewports
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Array.pm
1 package Reaction::UI::Widget::Field::Array;
2
3 use Reaction::UI::WidgetClass;
4
5 class Array, which {
6
7   before fragment widget {
8     arg 'label' => $_{viewport}->label;
9   };
10
11   implements fragment list {
12     render 'item' => over $_{viewport}->value_names;
13   };
14
15   implements fragment item {
16     arg 'name' => $_;
17   };
18
19 };
20
21 1;
22
23 __END__;
24
25 =head1 NAME
26
27 Reaction::UI::Widget::DisplayField::Array
28
29 =head1 DESCRIPTION
30
31 =head1 FRAGMENTS
32
33 =head2 widget
34
35 renders C<label> and C<list> passing additional variable "viewport"
36
37 =head2 label
38
39 C<content> contains the viewport's label
40
41 =head2 list
42
43 renders fragment item over the viewport's C<value_names>
44
45 =head2 item
46
47 C<content> contains the value of the current item ($_ / $_{_})
48
49 =head1 AUTHORS
50
51 See L<Reaction::Class> for authors.
52
53 =head1 LICENSE
54
55 See L<Reaction::Class> for the license.
56
57 =cut