1 package ComponentUI::Controller::Root;
5 use base 'Reaction::UI::Controller::Root';
8 use aliased 'Reaction::UI::ViewPort';
9 use aliased 'Reaction::UI::ViewPort::SiteLayout';
12 # Sets the actions in this controller to be registered with no prefix
13 # so they function identically to actions created in MyApp.pm
17 window_title => 'Reaction Test App',
21 sub base :Chained('/') :PathPart('') :CaptureArgs(0) {
23 $self->push_viewport(SiteLayout,
24 title => 'ComponentUI test title',
25 static_base_uri => "${\$c->uri_for('static')}",
29 sub root :Chained('base') :PathPart('') :Args(0) {
31 $self->push_viewport(ViewPort, layout => 'index');
34 sub static :Chained('base') :PathPart('static') :Args {
35 my ($self, $c, @args) = @_;
36 return if $c->stash->{window}->view->serve_static_file($c, \@args);
37 $c->forward('error_404');
40 sub error_404 :Private {
42 $c->res->body("Error 404");