1 package ComponentUI::Controller::TestModel::Foo;
4 BEGIN { extends 'Reaction::UI::Controller::Collection::CRUD'; }
6 use aliased 'Reaction::UI::ViewPort::SearchableListViewContainer';
7 use aliased 'ComponentUI::TestModel::Foo::SearchSpec';
8 use aliased 'ComponentUI::TestModel::Foo::Action::SearchSpec::Update';
11 model_name => 'TestModel',
12 collection_name => 'Foo',
14 base => { Chained => '/base', PathPart => 'testmodel/foo' },
17 action_prototypes => { delete_all => 'Delete all records' },
18 excluded_fields => [qw/id/],
19 action_order => [qw/delete_all create/],
20 enable_order_by => [qw/last_name/],
22 action_order => [qw/view update delete/],
28 excluded_fields => [qw/id/],
32 ViewPort => {message => 'Are you sure you want to delete this Foo?'}
37 for my $action (qw/view create update/){
42 container_layouts => [
43 { name => 'primary', fields => [qw/first_name last_name/]},
46 label => 'Optional Label',
47 fields => [qw/bars bazes/],
56 override _build_action_viewport_map => sub {
58 $map->{list} = SearchableListViewContainer;
62 override _build_action_viewport_args => sub {
64 $args->{list}{spec_class} = SearchSpec;
65 $args->{list}{action_class} = Update;
69 sub object : Chained('base') PathPart('id') CaptureArgs(1) {
70 my ($self, $c, $object) = @_;
71 $self->next::method($c, $object);
72 # just as failing use case