diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-22 17:12:37 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-22 17:12:37 +0000 |
commit | 9c58ab37178013609903625fe4f96b3f515ddaea (patch) | |
tree | 6e324daaaae622581d608cd654e29f47dd0b6335 /lib/Reaction/UI/Widget | |
parent | 4b0ebd4e81012a5e6a5f77d7921176525dd89ace (diff) | |
parent | e984a788c5ee855209cb6a4cc4fc07c085009b47 (diff) | |
download | reaction-9c58ab37178013609903625fe4f96b3f515ddaea.tar.gz reaction-9c58ab37178013609903625fe4f96b3f515ddaea.zip |
r21704@martha (orig r864): groditi | 2008-08-20 20:55:12 -0400
svk add FAIL
Diffstat (limited to 'lib/Reaction/UI/Widget')
-rw-r--r-- | lib/Reaction/UI/Widget/Field/Container.pm | 56 | ||||
-rw-r--r-- | lib/Reaction/UI/Widget/Object/Mutable.pm | 31 |
2 files changed, 87 insertions, 0 deletions
diff --git a/lib/Reaction/UI/Widget/Field/Container.pm b/lib/Reaction/UI/Widget/Field/Container.pm new file mode 100644 index 0000000..ba7fa28 --- /dev/null +++ b/lib/Reaction/UI/Widget/Field/Container.pm @@ -0,0 +1,56 @@ +package Reaction::UI::Widget::Field::Container; + +use Reaction::UI::WidgetClass; + +use namespace::clean -except => [ qw(meta) ]; + +before fragment widget { + arg name => $_{viewport}->name; +}; + +implements fragment maybe_label { + return unless $_{viewport}->has_label; + arg label => $_{viewport}->label; + render 'label'; +}; + +implements fragment field_list { + render field => over $_{viewport}->fields; +}; + +implements fragment field { + render 'viewport'; +}; + +__PACKAGE__->meta->make_immutable; + +1; + +__END__; + +=head1 NAME + +Reaction::UI::Widget::Field::Container + +=head1 DESCRIPTION + +=head1 FRAGMENTS + +=head2 field_list + +Sequentially renders the C<fields> of the viewport; + +=head2 field + +Renders the C<field> viewport passed by C<field_list> + +=head1 AUTHORS + +See L<Reaction::Class> for authors. + +=head1 LICENSE + +See L<Reaction::Class> for the license. + +=cut + diff --git a/lib/Reaction/UI/Widget/Object/Mutable.pm b/lib/Reaction/UI/Widget/Object/Mutable.pm new file mode 100644 index 0000000..563c72b --- /dev/null +++ b/lib/Reaction/UI/Widget/Object/Mutable.pm @@ -0,0 +1,31 @@ +package Reaction::UI::Widget::Object::Mutable; + +use Reaction::UI::WidgetClass; + +use namespace::clean -except => [ qw(meta) ]; +extends 'Reaction::UI::Widget::Object'; + +__PACKAGE__->meta->make_immutable; + +1; + +__END__; + +=head1 NAME + +Reaction::UI::Widget::Object::Mutable + +=head1 DESCRIPTION + +=head1 FRAGMENTS + +=head1 AUTHORS + +See L<Reaction::Class> for authors. + +=head1 LICENSE + +See L<Reaction::Class> for the license. + +=cut + |