Mercurial > pub > Impl
comparison Lib/IMPL/Web/QueryHandler/PageFormat.pm @ 64:259cd3df6e53
Doc generation
Minor fixes
author | wizard |
---|---|
date | Mon, 15 Mar 2010 17:45:13 +0300 |
parents | 76b878ad6596 |
children | 2840c4c85db8 |
comparison
equal
deleted
inserted
replaced
63:76b878ad6596 | 64:259cd3df6e53 |
---|---|
1 package IMPL::Web::QueryHandler::PageFormat; | 1 package IMPL::Web::QueryHandler::PageFormat; |
2 use base qw(IMPL::Web::QueryHandler); | 2 use base qw(IMPL::Web::QueryHandler IMPL::Object::Autofill); |
3 | 3 |
4 __PACKAGE__->PassThroughArgs; | 4 __PACKAGE__->PassThroughArgs; |
5 | 5 |
6 use IMPL::Class::Property; | 6 use IMPL::Class::Property; |
7 use IMPL::Web::TDocument; | 7 use IMPL::Web::TDocument; |
8 use Error qw(:try); | 8 use Error qw(:try); |
9 | 9 |
10 BEGIN { | |
11 public property charsetTemplates => prop_all; | |
12 } | |
13 | |
14 sub CTOR { | |
15 my ($this) = @_; | |
16 | |
17 $this->charsetTemplates('utf-8') unless $this->charsetTemplates; | |
18 } | |
19 | |
10 sub Process { | 20 sub Process { |
11 my ($this,$action,$nextHandler) = @_; | 21 my ($this,$action,$nextHandler) = @_; |
12 | 22 |
13 my $doc = new IMPL::Web::TDocument(); | 23 my $doc = new IMPL::Web::TDocument(); |
14 | 24 |
15 try { | 25 try { |
16 $doc->loadFile ( $ENV{PATH_TRANSLATED}, 'cp1251' ); | 26 $doc->loadFile ( $ENV{PATH_TRANSLATED}, $this->charsetTemplates ); |
17 | 27 |
18 $action->response->contentType('text/html'); | 28 $action->response->contentType('text/html'); |
19 my $hOut = $action->response->streamBody; | 29 my $hOut = $action->response->streamBody; |
20 | 30 |
21 print $hOut $doc->Render(); | 31 print $hOut $doc->Render(); |