diff options
Diffstat (limited to 'lib/ComponentUI/Controller/TestModel')
-rw-r--r-- | lib/ComponentUI/Controller/TestModel/Foo.pm | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Foo.pm b/lib/ComponentUI/Controller/TestModel/Foo.pm index 2fb994c..04a56e8 100644 --- a/lib/ComponentUI/Controller/TestModel/Foo.pm +++ b/lib/ComponentUI/Controller/TestModel/Foo.pm @@ -3,6 +3,10 @@ package ComponentUI::Controller::TestModel::Foo; use base 'Reaction::UI::Controller::Collection::CRUD'; use Reaction::Class; +use aliased 'Reaction::UI::ViewPort::SearchableListViewContainer'; +use aliased 'ComponentUI::TestModel::Foo::SearchSpec'; +use aliased 'ComponentUI::TestModel::Foo::Action::SearchSpec::Update'; + __PACKAGE__->config( model_name => 'TestModel', collection_name => 'Foo', @@ -49,11 +53,19 @@ for my $action (qw/view create update/){ ); } -# sub _build_action_viewport_args { -# my $self = shift; -# my $args = $self->next::method(@_); -# # $args->{list}{action_prototypes}{delete_all}{label} = 'Delete All Records'; -# return $args; -# } +override _build_action_viewport_map => sub { + my $map = super(); + $map->{list} = SearchableListViewContainer; + return $map; +}; + +override _build_action_viewport_args => sub { + my $args = super(); + $args->{list}{spec_class} = SearchSpec; + $args->{list}{action_class} = Update; + return $args; +}; 1; + +__END__; |