search spec components factored out of T365
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Array.pm
index cf318c9..f80bf67 100644 (file)
@@ -2,32 +2,36 @@ package Reaction::UI::Widget::Field::Array;
 
 use Reaction::UI::WidgetClass;
 
-class Array, which {
+use namespace::clean -except => [ qw(meta) ];
 
-  before fragment widget {
-    arg 'label' => $_{viewport}->label;
-  };
 
-  implements fragment list {
-    render 'item' => over $_{viewport}->value_names;
-  };
+before fragment widget {
+  arg 'label' => localized $_{viewport}->label;
+};
 
-  implements fragment item {
-    arg 'name' => $_;
-  };
+implements fragment list {
+  render 'item' => over $_{viewport}->value_names;
+};
 
+implements fragment item {
+  arg 'name' => localized $_;
 };
 
+__PACKAGE__->meta->make_immutable;
+
+
 1;
 
 __END__;
 
 =head1 NAME
 
-Reaction::UI::Widget::DisplayField::Array
+Reaction::UI::Widget::Field::Array - A field representing an array of localised items
 
 =head1 DESCRIPTION
 
+See L<Reaction::UI::Widget::Field::Collection>, of which this widget is not a subclass.
+
 =head1 FRAGMENTS
 
 =head2 widget