1 package Reaction::UI::Widget::Value::Collection;
3 use Reaction::UI::WidgetClass;
5 use namespace::clean -except => [ qw(meta) ];
8 before fragment widget {
9 arg 'label' => localized $_{viewport}->label;
12 implements fragment list {
13 render 'item' => over $_{viewport}->value_names;
16 implements fragment item {
17 arg 'name' => localized $_;
20 __PACKAGE__->meta->make_immutable;
30 Reaction::UI::Widget::Value::Collection
34 This widget provides an additional C<label> argument for the C<widget>
35 fragment containing the localised value of the viewports C<label> attribute.
37 It also implements the fragments C<list> and C<item>.
39 =head1 FRAGMENTS AND LAYOUTS
43 This will set the C<label> argument to the return value of the C<label> method
44 on the viewport. The base layout will then render the C<list> fragment.
48 This will render the C<item> fragment once for every entry in the viewports
49 C<value_names>. The base layout will surround the rendered output with a unordered
54 This will set the argument C<name> to the localised value of the current iteration
55 (stored in C<$_>). The base layout will render a list item with the value as
56 html escaped content of the item.
60 share/skin/base/layout/value/collection.tt
61 share/skin/base/layout/value/list.tt
65 See L<Reaction::Class> for authors.
69 See L<Reaction::Class> for the license.