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