use Reaction::Types::Core qw/NonEmptySimpleStr/;
use namespace::clean -except => [ qw(meta) ];
- extends Object;
-
-extends 'Reaction::UI::ViewPort::Object::Mutable';
with 'Reaction::UI::ViewPort::Action::Role::OK';
-#this has to fucking go. it BLOWS.
-has method => (
- is => 'rw',
- isa => NonEmptySimpleStr,
- default => sub { 'post' }
-);
+has model => (
+ is => 'ro',
+ isa => 'Reaction::InterfaceModel::Action',
+ required => 1
+ );
has changed => (
is => 'rw',
=head1 SYNOPSIS
+ use aliased 'Reaction::UI::ViewPort::Object::Mutable';
+
+ $self->push_viewport(Mutable,
+ layout => 'register',
+ model => $action,
+ next_action => [ $self, 'redirect_to', 'accounts', $c->req->captures ],
+ ctx => $c,
+ field_order => [
+ qw / contact_title company_name email address1 address2 address3
+ city country post_code telephone mobile fax/ ],
+ );
+
=head1 DESCRIPTION
- This subclass of L<Reaction::UI::ViewPort::Object> is used for rendering a
- collection of C<Reaction::UI::ViewPort::Field::Mutable::*> objects for user editing.
+ This subclass of L<Reaction::UI::ViewPort::Object::Mutable> is used for
+ rendering a complete form supporting Apply, Close and OK.
=head1 ATTRIBUTES
my $attr = $param_attrs{$field_name};
my $meth = $self->builder_cache->{$field_name} ||= $self->get_builder_for($attr);
my $field = $self->$meth($attr, ($args->{$field_name} || {}));
- push(@fields, $field) if $field;
+ next unless $field;
+ push(@fields, $field);
}
return \@fields;
- };
+ }
+
+
sub _build_computed_field_order {
my ($self) = @_;
my %excluded = map { $_ => undef } @{ $self->excluded_fields };