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