Commit | Line | Data |
e22de101 |
1 | package Reaction::UI::Widget::Value; |
2 | |
3 | use Reaction::UI::WidgetClass; |
4 | |
5 | class Value, which { |
a5200252 |
6 | widget renders [ string {""} ], |
7 | { value => sub{ |
8 | my $vp = $_{self}->{viewport}; |
9 | $vp->can('value_string') ? $vp->value_string : $vp->value; |
10 | } |
11 | }; |
e22de101 |
12 | }; |
13 | |
14 | 1; |
15 | |
16 | __END__; |
17 | |
18 | =head1 NAME |
19 | |
20 | Reaction::UI::Widget::Value |
21 | |
22 | =head1 DESCRIPTION |
23 | |
24 | =head1 FRAGMENTS |
25 | |
26 | =head2 widget |
27 | |
28 | Additional variables available in topic hash: "viewport". |
29 | |
30 | Renders "label" and "field" |
31 | |
32 | =head2 field |
33 | |
34 | C<content> will contain the value, if any, of the field. |
35 | |
36 | =head1 AUTHORS |
37 | |
38 | See L<Reaction::Class> for authors. |
39 | |
40 | =head1 LICENSE |
41 | |
42 | See L<Reaction::Class> for the license. |
43 | |
44 | =cut |