Commit | Line | Data |
e22de101 |
1 | package Reaction::UI::Widget::Value::Collection; |
2 | |
3 | use Reaction::UI::WidgetClass; |
4 | |
5 | class Collection, which { |
aa8c0c90 |
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 | |
e22de101 |
19 | }; |
20 | |
21 | 1; |
22 | |
23 | __END__; |
24 | |
25 | |
26 | =head1 NAME |
27 | |
28 | Reaction::UI::Widget::Value::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 list |
39 | |
40 | renders fragment item over the viewport's C<value_names> |
41 | |
42 | =head2 item |
43 | |
44 | C<content> contains the value of the current item ($_ / $_{_}) |
45 | |
46 | =head1 AUTHORS |
47 | |
48 | See L<Reaction::Class> for authors. |
49 | |
50 | =head1 LICENSE |
51 | |
52 | See L<Reaction::Class> for the license. |
53 | |
54 | =cut |