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