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