widget documentation
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Field / Mutable / HiddenArray.pm
CommitLineData
2f670e13 1package Reaction::UI::Widget::Field::Mutable::HiddenArray;
8f19d042 2
3use Reaction::UI::WidgetClass;
4
2f670e13 5#move this to a normal list and let the hidden part be decided by the template..
bae75bee 6use namespace::clean -except => [ qw(meta) ];
7extends 'Reaction::UI::Widget::Field::Mutable';
8f19d042 8
664d660c 9
9de685fc 10
bae75bee 11implements fragment hidden_list {
12 render hidden_field => over $_{viewport}->value;
8f19d042 13};
14
bae75bee 15implements fragment hidden_field {
16 arg field_value => $_;
17};
18
19__PACKAGE__->meta->make_immutable;
20
21
8f19d042 221;
23
6ab43711 24__END__;
8f19d042 25
5a1a893e 26=head1 NAME
8f19d042 27
87b8ba85 28Reaction::UI::Widget::Field::Mutable::HiddenArray
8f19d042 29
5a1a893e 30=head1 DESCRIPTION
8f19d042 31
f9b32c83 32See L<Reaction::UI::Widget::Field::Mutable>. This renders a list of values
33as a series of hidden fields to transport them across forms.
8f19d042 34
5a1a893e 35=head1 FRAGMENTS
8f19d042 36
f9b32c83 37=head2 hidden_list
38
39Renders C<hidden_field> over the array reference stored in the viewpoint's
40C<value>.
41
42=head2 hidden_field
43
44Sets the C<field_value> argument to the current topic argument C<_>.
45
5a1a893e 46=head2 field
8f19d042 47
5a1a893e 48renders fragment C<item> over the values of 'value' arrayref
8f19d042 49
5a1a893e 50=head2 item
51
52C<content> is $_{_} / $_ (current item in the 'value' array)
53
f9b32c83 54=head1 LAYOUT SETS
55
56=head2 base
57
58 share/skin/base/layout/field/mutable/hidden_array.tt
59
60Provides a C<hidden_field> layout that renders a hidden input element.
61
5a1a893e 62=head1 AUTHORS
63
64See L<Reaction::Class> for authors.
65
66=head1 LICENSE
67
68See L<Reaction::Class> for the license.
8f19d042 69
70=cut