1 package Reaction::UI::Widget::Value;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
8 before fragment widget {
9 if ($_{viewport}->can('value_string')) {
10 arg value => $_{viewport}->value_string;
11 } elsif($_{viewport}->can('value')) {
12 arg value => $_{viewport}->value;
16 __PACKAGE__->meta->make_immutable;
25 Reaction::UI::Widget::Value
29 This widget provides the return value of the C<vlues_string> or C<value>
30 method on the viewport (depending on which is available first) via the
31 C<value> argument to widget.
33 =head1 INCLUDED SUBCLASSES
37 =item L<Reaction::UI::Widget::Value::Boolean>
39 Will simply display the C<value>.
41 =item L<Reaction::UI::Widget::Value::Collection>
43 This widget iterates over a collection of values provided by the viewport
44 and renders an unordered list out of them.
46 =item L<Reaction::UI::Widget::Value::DateTime>
48 A simple subclass of L<Reaction::UI::Widget::Value>, currently not doing
51 =item L<Reaction::UI::Widget::Value::Image>
53 Provides C<has_image> and C<no_image> blocks that will be rendered depending
54 on the viewports C<value_string> attribute. The defaults are to either render
55 an image tag, or to output nothing at all.
57 =item L<Reaction::UI::Widget::Value::Number>
59 A simple subclass of C<Reaction::UI::Widget::Value> that doesn't do much yet.
61 =item L<Reaction::UI::Widget::Value::RelatedObject>
63 A simple subclass of C<Reaction::UI::Widget::Value> that doesn't do much yet.
65 =item L<Reaction::UI::Widget::Value::String>
67 A simple subclass of C<Reaction::UI::Widget::Value> that doesn't do much yet.
69 =item L<Reaction::UI::Widget::Value::Text>
71 A simple subclass of C<Reaction::UI::Widget::Value> that doesn't do much yet.
79 Additional available arguments
83 =item B<value> - The C<value_string> or C<value> of the viewport
89 See L<Reaction::Class> for authors.
93 See L<Reaction::Class> for the license.