aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI/Controller/TestModel
diff options
context:
space:
mode:
authoredenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-09-15 03:51:37 +0000
committeredenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-09-15 03:51:37 +0000
commit13070d3447af4f02bee3e139744440c433755f6f (patch)
treec1054c9f414e3f10fe04d2963bfad34539dc4832 /lib/ComponentUI/Controller/TestModel
parenta0ff2c8198d7cfcdefad1cbbaf339bd849a9c2c0 (diff)
downloadreaction-13070d3447af4f02bee3e139744440c433755f6f.tar.gz
reaction-13070d3447af4f02bee3e139744440c433755f6f.zip
added search spec sample to demo app
Diffstat (limited to 'lib/ComponentUI/Controller/TestModel')
-rw-r--r--lib/ComponentUI/Controller/TestModel/Foo.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Foo.pm b/lib/ComponentUI/Controller/TestModel/Foo.pm
index 917ea17..d636c6c 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,10 +53,18 @@ for my $action (qw/view create update/){
);
}
+override _build_action_viewport_map => sub {
+ my $map = super();
+ $map->{list} = SearchableListViewContainer;
+ $map;
+};
+
sub _build_action_viewport_args {
my $self = shift;
my $args = $self->next::method(@_);
$args->{list}{action_prototypes}{delete_all}{label} = 'Delete All Records';
+ $args->{list}{spec_class} = SearchSpec;
+ $args->{list}{action_class} = Update;
return $args;
}