a688c285806b3f33cc9f9448674f2f1829d891db
[catagits/Reaction.git] / lib / Reaction / UI / Widget / DisplayField.pm
1 package Reaction::UI::Widget::DisplayField;
2
3 use Reaction::UI::WidgetClass;
4
5 class DisplayField, which {
6   fragment widget [ qw/label value/ ];
7   fragment label  [ string { $_{viewport}->label } ];
8   fragment value  [ string { $_{viewport}->value } ];
9 };
10
11 1;
12
13 __END__;
14
15 =head1 NAME
16
17 Reaction::UI::Widget::DisplayField
18
19 =head1 DESCRIPTION
20
21 =head1 FRAGMENTS
22
23 =head2 widget
24
25 Additional variables available in topic hash: "viewport".
26
27 Renders "label" and "field"
28
29 =head2 field
30
31  C<content> will contain the value, if any,  of the field.
32
33 =head2 label
34
35  C<content> will contain the label, if any, of the field.
36
37 =head1 AUTHORS
38
39 See L<Reaction::Class> for authors.
40
41 =head1 LICENSE
42
43 See L<Reaction::Class> for the license.
44
45 =cut