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