sub begin :Private {
my ($self, $ctx) = @_;
- my $window :Stashed = Reaction::UI::Window->new(
- ctx => $ctx,
- view_name => $self->view_name,
- content_type => $self->content_type,
- title => $self->window_title,
- );
- my $focus_stack :Stashed = $window->focus_stack;
+ $ctx->stash(
+ window => Reaction::UI::Window->new(
+ ctx => $ctx,
+ view_name => $self->view_name,
+ content_type => $self->content_type,
+ title => $self->window_title,
+ )
+ );
+ $ctx->stash(focus_stack => $ctx->stash->{window}->focus_stack);
}
sub end :Private {
- my $window :Stashed;
- $window->flush;
+ my ($self, $ctx) = @_;
+ $ctx->stash->{window}->flush;
+}
+
+sub error_404 :Private {
+ my ($self, $c) = @_;
+ $c->res->body("Error 404: File not Found");
+ $c->res->status(404);
+}
+
+sub error_403 :Private {
+ my ($self, $c) = @_;
+ $c->res->body("Error 403: Forbidden");
+ $c->res->status(403);
}
1;