Mercurial > pub > Impl
annotate 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 |
rev | line source |
---|---|
62 | 1 package IMPL::Web::QueryHandler::PageFormat; |
64 | 2 use base qw(IMPL::Web::QueryHandler IMPL::Object::Autofill); |
62 | 3 |
4 __PACKAGE__->PassThroughArgs; | |
5 | |
6 use IMPL::Class::Property; | |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
7 use IMPL::Web::TDocument; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
8 use Error qw(:try); |
62 | 9 |
64 | 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 | |
62 | 20 sub Process { |
21 my ($this,$action,$nextHandler) = @_; | |
22 | |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
23 my $doc = new IMPL::Web::TDocument(); |
62 | 24 |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
25 try { |
64 | 26 $doc->loadFile ( $ENV{PATH_TRANSLATED}, $this->charsetTemplates ); |
63
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
27 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
28 $action->response->contentType('text/html'); |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
29 my $hOut = $action->response->streamBody; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
30 |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
31 print $hOut $doc->Render(); |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
32 } finally { |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
33 $doc->Dispose; |
76b878ad6596
Added serialization support for the IMPL::Object::List
wizard
parents:
62
diff
changeset
|
34 }; |
62 | 35 } |
36 | |
37 1; |