ObjectView converted
[catagits/Reaction.git] / lib / Reaction / UI / Widget / DisplayField / Collection.pm
1 package Reaction::UI::Widget::DisplayField::Collection;
2
3 use Reaction::UI::WidgetClass;
4
5 class Collection, 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
26 =head1 NAME
27
28 Reaction::UI::Widget::DisplayField::Collection
29
30 =head1 DESCRIPTION
31
32 =head1 FRAGMENTS
33
34 =head2 widget
35
36 renders C<label> and C<list> passing additional variable "viewport"
37
38 =head2 label
39
40 C<content> contains the viewport's label
41
42 =head2 list
43
44 renders fragment item over the viewport's C<value_names>
45
46 =head2 item
47
48 C<content> contains the value of the current item ($_ / $_{_})
49
50 =head1 AUTHORS
51
52 See L<Reaction::Class> for authors.
53
54 =head1 LICENSE
55
56 See L<Reaction::Class> for the license.
57
58 =cut