Commit | Line | Data |
---|---|---|
7b78a39d | 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') ]; | |
a5200252 | 9 | item renders [ string { $_ } ]; |
7b78a39d | 10 | }; |
11 | ||
12 | 1; | |
13 | ||
14 | __END__; | |
15 | ||
5a1a893e | 16 | =head1 NAME |
7b78a39d | 17 | |
5a1a893e | 18 | Reaction::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 | 26 | renders C<label> and C<list> passing additional variable "viewport" |
7b78a39d | 27 | |
5a1a893e | 28 | =head2 label |
7b78a39d | 29 | |
5a1a893e | 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. | |
7b78a39d | 47 | |
48 | =cut |