use Reaction::UI::WidgetClass;
class Collection, which {
- widget renders [ qw/label list item/ => { viewport => func(self => 'viewport') } ];
- label renders [ string { $_{viewport}->label } ];
- list renders [ item over func('viewport', 'value_names') ];
- item renders [ string { $_{_} } ];
+
+ before fragment widget {
+ arg 'label' => $_{viewport}->label;
+ };
+
+ implements fragment list {
+ render 'item' => over $_{viewport}->value_names;
+ };
+
+ implements fragment item {
+ arg 'name' => $_;
+ };
+
};
1;
__END__;
-=for layout widget
-[% label %]
-[% list %]
+=head1 NAME
+
+Reaction::UI::Widget::DisplayField::Collection
+
+=head1 DESCRIPTION
+
+=head1 FRAGMENTS
+
+=head2 widget
+
+renders C<label> and C<list> passing additional variable "viewport"
+
+=head2 label
+
+C<content> contains the viewport's label
+
+=head2 list
+
+renders fragment item over the viewport's C<value_names>
-=for layout label
+=head2 item
-<strong > [ % content %]: </strong>
+C<content> contains the value of the current item ($_ / $_{_})
-=for layout list
+=head1 AUTHORS
-<ul>
-[% item %]
-</ul>
+See L<Reaction::Class> for authors.
-=for layout item
+=head1 LICENSE
-<li>[% content %]</li>
+See L<Reaction::Class> for the license.
=cut